Skip to content

The backend service building RESTful APIs and microservices, using Node.js, Express and MongoDB

Notifications You must be signed in to change notification settings

khangng2611/itourbot-backend

Repository files navigation

iTourbot REST API Service

The backend service for iTourbot project which building RESTful APIs and microservices using Node.js, Express and MongoDB

Features

Requirements

Getting Started

Install dependencies:

yarn

Set environment variables:

cp .env.example .env

Running Locally

yarn dev

Running in Production

yarn start

Lint

# lint code with ESLint
yarn lint

# try to fix ESLint errors
yarn lint:fix

# lint and watch for changes
yarn lint:watch

Test

# run all tests with Mocha
yarn test

# run unit tests
yarn test:unit

# run integration tests
yarn test:integration

# run all tests and watch for changes
yarn test:watch

# open nyc test coverage reports
yarn coverage

Validate

# run lint and tests
yarn validate

Logs

# show logs in production
pm2 logs

Documentation

# generate and open api documentation
yarn docs

Docker

# run container locally
yarn docker:dev

# run container in production
yarn docker:prod

# run tests
yarn docker:test

Deploy

Set your server ip:

DEPLOY_SERVER=127.0.0.1

Replace my Docker username with yours:

nano deploy.sh

Run deploy script:

yarn deploy

About

The backend service building RESTful APIs and microservices, using Node.js, Express and MongoDB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published