Git Product home page Git Product logo

nestjs-mongo-rest's Introduction

NODEJS-MONGO BACKEND

A backend built with Node.js with development and production settings using docker-compose.

Description

REST-API backend implementing CRUD operations using Nest and Mongodb. In development mode, the backend uses a very simple in-memory storage implemented with array-simple-query.

Installation

$ npm install

Running the app directly on the host OS

# development
$ npm run start

# watch mode
$ npm run start:dev

Running the app on a docker container

# watch mode
$ docker-compose -f docker-compose-dev up runbackend.

# production mode
$ build-image.sh
$ docker-compose up

Test

# unit tests
$ docker-compose -f docker-compose-dev.yml up unittest

# e2e tests
$ docker-compose -f docker-compose-dev.yml up e2etest

Most important files

File Description
./Dockerfile Docker recipe to create the production image to run the application.
./build-image.sh Script to build the production image,to be used, for example, in a continous integration workflow.
./docker-compose.yml docker compose to spin up the backend and mongodb in production mode.
./Dockerfile-dev Docker recipe to create an image with extra libs for development.
./docker-compose-dev.yml docker compose to buid, run and test the application in development.
./src/developers/repositories/developers.mem.respository.ts in-memory repository interfaces with service layer.
./src/developers/repositories/developers.mongo.respository.ts mongo reposistory interfaces with service layer.
--- ---

Stay in touch

  • Author - Carlos Viol Barbosa

License

Nest is MIT licensed.

nestjs-mongo-rest's People

Watchers

Carlos Viol Barbosa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.