ESTS (express-sequelize-ts)
is a TypeScript-based boilerplate that enables the creation of web applications using the Express framework and Sequelize ORM.
- 🟦 TypeScript - A strongly typed programming language that builds on JavaScript.
- 🌐 Node.js - An asynchronous event-driven JavaScript runtime.
- 🚚 Express - A minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
- 💾 Sequelize - A promise-based Node.js ORM tool for various Relational database.
- 📚 TypeStack - A decorator-based frameworks and libraries for Node and browser.
- 🛠 Jest - A delightful JavaScript Testing Framework focusing on simplicity.
- 🚧 ESLint - An open-source project that helps to find and fix problems with the project's JavaScript code.
- 🎨 Prettier - An opinionated code formatter supporting the project's code.
- 🐳 Docker - A platform designed to help developers build, share, and run container applications.
- 🚫 JWT authentication, to ensure secure access to the API.
- 🎢 A Layered architecture (Controller, Service, Repository, Model).
- 📦 Dependency injection for better code organization.
- 📝 Swagger for API documentation and testing.
- ♻️ Data Transport Object (DTO) to validate request and response data.
- Node 18.12.x
- Yarn
- SQLite (or any other database supported by Sequelize)
- Docker (optional)
Run the following commands to set environment variables and install dependencies:
## set environment variables
#### make .env.{NODE_ENV} file using .env.example file
#### EX) .env.development | .env.test
$ cp .env.example .env.development
## install dependencies
#### using yarn
$ yarn install
#### using Docker
$ yarn docker:build
then, you can run locally in development and test mode:
## run locally in development and test mode
#### using yarn
$ yarn dev | test:integration | test:unit:all | test:unit {path}
#### using Docker
$ yarn docker:dev | docker:test
call test API endpoints:
// http://localhost:3000/api
// Content-Type: application/json
{
"message": "Hello World"
}
you can deploy to production using yarn or Docker:
## using yarn
$ yarn build
$ yarn start
## using Docker
$ yarn docker:prod
-
Add unit test -
Add integration test -
Add docker-compose -
Add swagger -
Write more specific documentation - Develop a new feature
This project is licensed under the MIT License - see the LICENSE file for details.