A starter template for any Enterprise Applications, Rest APIs or Microservices with Node.js, Express and Sequelize ORM for MySQL, PostgreSQL or others. This project offers production ready environment with all necessary supports for validation, unit testing, socket, redis and many more.
Clone the repo:
git clone https://github.com/ItzSamdam/Node-Js-Starter-Template.git
cd Node-Js-Starter-TemplateInstall the dependencies:
yarn installSet the environment variables:
cp .env.example .env
# open .env and modify the environment variables (if needed)Running locally:
yarn devRunning in production:
yarn startTesting:
# run all tests
yarn test
public\
src\
|--config\ # Environment variables and configuration related things
|--controllers\ # Route controllers (controller layer)
|--daom\ # Data Access Object for models
|--database\ # Migrations and Seed files
|--middlewares\ # Provide Security Layer in app
|--models\ # Sequelize models (data layer)
|--routes\ # Routes
|--services\ # Business logic (service layer)
|--utilities\ # Utilities classes and functions
|--validators\ # Request data validation schemas
|--app.js # Express app
|--cronJobs.js # Job Scheduler
|--server.js # App entry point