https://github.com/masb0ymas/express-api-sequelize
express-api with Sequelize
https://github.com/masb0ymas/express-api-sequelize
expressjs expresso husky nodejs sequelize-orm sequelize-typescript swc typescript
Last synced: 22 days ago
JSON representation
express-api with Sequelize
- Host: GitHub
- URL: https://github.com/masb0ymas/express-api-sequelize
- Owner: masb0ymas
- License: mit
- Created: 2020-02-26T16:50:42.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-23T05:45:07.000Z (about 1 month ago)
- Last Synced: 2025-05-11T02:07:53.842Z (22 days ago)
- Topics: expressjs, expresso, husky, nodejs, sequelize-orm, sequelize-typescript, swc, typescript
- Language: TypeScript
- Homepage:
- Size: 8.34 MB
- Stars: 142
- Watchers: 6
- Forks: 49
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Express API with Sequelize
[](https://github.com/masb0ymas/express-api-sequelize#readme)
[](https://github.com/masb0ymas/express-api-sequelize/graphs/commit-activity)
[](https://github.com/masb0ymas/express-api-sequelize/blob/master/LICENSE.md)
[](https://github.com/masb0ymas/express-api-sequelize/releases/tag/v6.0.0)
[](https://expressjs.com/)


A robust Express API template with TypeScript, Sequelize ORM, and comprehensive tooling for building production-ready applications.
Base API using [express-api](https://github.com/masb0ymas/express-api)## Features
- **[TypeScript](https://github.com/microsoft/TypeScript)** `5.8.x` - Type-safe JavaScript
- **[Sequelize](https://github.com/sequelize/sequelize)** `6.x` - Powerful ORM for SQL databases
- **[Express](https://expressjs.com/)** `4.21.x` - Fast, unopinionated web framework
- **[Nodemailer](https://github.com/nodemailer/nodemailer)** `6.x` - Email sending made simple
- **[Zod](https://github.com/colinhacks/zod)** `3.x` - TypeScript-first schema validation
- **[PostgreSQL](https://www.postgresql.org/)** - Advanced open source database
- **Code Quality**
- JavaScript Style with [Standard with TypeScript](https://github.com/standard/eslint-config-standard-with-typescript)
- Code formatting with [Prettier](https://github.com/prettier/prettier)
- [ESLint](https://github.com/prettier/eslint-config-prettier) and [TypeScript ESLint](https://github.com/typescript-eslint/typescript-eslint) integration
- **API Documentation** with [Swagger](https://github.com/swagger-api/swagger-ui) OpenAPI `3.x`
- **Logging** with [Pino](https://github.com/pinojs/pino)
- **Containerization** with [Docker](https://www.docker.com/)## Prerequisites
- Node.js >= 20.x
- PostgreSQL
- Docker (optional)## Module System
- By default, the `main` branch uses CommonJs (`type: commonjs`)
- For ES Module pending implementation because of Sequelize issue.## Getting Started
1. **Clone the repository**
```bash
git clone https://github.com/masb0ymas/express-api-sequelize.git
cd express-api-sequelize
```2. **Set up environment variables**
```bash
cp .env.example .env
```Then configure database settings in the `.env` file.
or you can generate .env with command:
```bash
yarn secret
```3. **Install dependencies**
```bash
yarn install
```4. **Set up database**
```bash
yarn db:create && yarn db:reset
```Or create your database manually
5. **Start development server**
```bash
yarn dev
```With file watching:
```bash
yarn dev:watch
```## Deployment
### Release Process
```bash
yarn release
```### Docker Deployment
```bash
# Build the Docker image
docker build -t yourname/express:v1.0.0 .# Run the container
docker run -p 7000:8000 -d yourname/express:v1.0.0
```## Scripts
- `npm run dev` - Start development server with hot reloading
- `npm run build` - Build for production
- `npm run start` - Start production server
- `npm run db:create` - Create database
- `npm run db:reset` - Reset database schema
- `npm run release` - Release a new version## Author
[](https://github.com/masb0ymas)
[](https://twitter.com/masb0ymas)
[](https://www.linkedin.com/in/masb0ymas)## Support
[](https://ko-fi.com/I2I03MVAI)
[
](https://trakteer.id/masb0ymas)
[
](https://www.paypal.com/paypalme/masb0ymas)