Giter Site home page Giter Site logo

test-project-nest's Introduction

Test App Backend Quick Start

Test App Backend uses Nest framework and it is dockerised.

Prequisite

Open these files to make sure it is using LF, the end of line sequence:

  1. wait-for-it.sh - the usage of this file is to wait until the mongodb is up and running before starting the test-app-nest container
  2. start.sh - kick start the test-app-nest backend

Run yarn install then yarn build before trying to host the backend app in docker

Running the app dockerised

1. build the docker image
$ docker build -t test-app-nest-image:master .

2. run docker image
$ docker-compose up -d

Once docker is up and running it can be can be accessed via e.g. localhost:3001/api/{controller}

Running the app locally

Perquisite

The backend app uses mongodb therefore you have two option:

  1. Installl mongodb locally and do not set any root username and root password. Otherwise, you need to modify the connection string in src/shared/service/MongooseConfigService.ts
  2. If docker is install then you can simply run docker-compose -f docker-compose.dev.yml up -d to host the mongodb

Installation

$ yarn install
# development
$ yarn run start

# watch mode
$ yarn start:dev

# debug mode
$ yarn start:debug

# production mode
$ yarn start:prod

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.