Skip to content

salauddinn/AdvanceTodoApp

Repository files navigation

##TodoAppp SERVER It is a NodeJS application using express. In order to run it locally, you can follow the below steps. Prerequisite:

  1. Node version 18.x to be installed on the system
  2. Docker

please check /api-docs for the swagger documentation

To run in local

  1. Install dependencies
npm install
  1. Create a .env file under root(api-server) and set below properties
MONGO_USERNAME=<value>
MONGO_PASSWORD=<value>
MONGO_HOST=<value>
MONGO_PORT=<value>
MONGO_DB_NAME=<value>
REDIS_URL=<value>
MONGO_URL=<value> #this can used instead other mongo envs if u have url
PORT=<value>
  1. Run in development mode( this will restart the server whenever some src file changes )
npm run start

To run tests

Use below command to run only unit tests

npm run test

Spin up local mongo db and redis

  1. Run mongodb and redis
docker-compose up -d
  1. To check whether the db is up and runnning
docker ps
  1. To connect with mongodb from terminal
    1. Install mongosh
    brew install mongosh
    1. Url to connect with mongodb
    mongosh "mongodb://root:[email protected]:27017/test?authSource=admin"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published