Skip to content

khanhhuy-bkdn/Nodejs-todo-service

 
 

Repository files navigation

Todo service

Features

  • No transpilers, just vanilla javascript
  • ES2017 latest features like Async/Await
  • CORS enabled
  • Uses yarn
  • Express + MongoDB (Mongoose)
  • Soft delete
  • Uses Mongoose (Class, plugin ... )
  • Docker support
  • Uses helmet to set some HTTP headers for security
  • Load environment variables from .env files with dotenv
  • Request validation with joi
  • Gzip compression with compression
  • API documentation geratorion with swagger
  • API docs view: :/swagger/view
  • Monitoring with pm2

Requirements

Getting Started

Clone the repo and make it yours:

git clone --depth 1 https://github.com/cedricVu/NodeJs-Todo-Service.git
cd Nodejs-todo-service
rm -rf .git

Install dependencies:

yarn install

Set environment variables:

cp .env.example .env

Running in your local

yarn start

Docker

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

Deploy

Set your server ip:

DEPLOY_SERVER=127.0.0.1

Replace my Docker username with yours:

nano deploy.sh

Run deploy script:

sh ./deploy.sh

License

MIT License - Cedric

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 56.3%
  • HTML 41.8%
  • Shell 1.3%
  • Dockerfile 0.6%