- Download or clone the project, access the project folder with the terminal and execute the CLI
npm install
- Create a .env file same as .env-sample / or change constants to your database options.
- Run the server
npm start
- Alternatively, you can run the server in development mode
npm run dev
- The server will be running on port 8080 or 5000
- Access http://localhost:8080/api/v1 in your browser
$ npm install
$ npm start
$ npm run dev
code to run the docker container
$ docker-compose up --build
$ docker-compose down
- To run all tests at once
npm run test
- To run coverage
npm run coverage
$ npm run test
$ npm run coverage
- To run eslint
npm run lint
- To run prettier
npm run format
$ npm run lint
$ npm run format
- To run pre-commit
npm run pre-commit
$ npm run pre-commit
- To run pre-push
npm run pre-push
$ npm run pre-push
.env should provide
DB_USER=your_db_user
DB_PASS=your_db_password
DB_URL=your_db_url
DB_NAME=your_db_name
DB_OPTION=your_db_option
MONGO_URI_PREFIX=your_mongo_uri_prefix
PORT=your_port
TOKEN_SECRET=your_token_secret
TOKEN_EXPIRE_IN=your_token_expire_in
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=your_google_redirect_uri
LOG_LEVEL=your_log_level
LOG_FILE_DIR=your_log_file_dir