1.0.0 • Published 7 months ago
create-express-quickstart v1.0.0
Express Quickstart
Express Quickstart is a boilerplate to quickly set up a production-ready RESTful API using Express.js. This package helps developers bootstrap their Node.js API projects with best practices, database support, linting, testing, and Docker integration.
Features
- Express.js - Fast and minimal web framework
- Knex.js - SQL query builder with support for migrations and seeding
- MySQL2 / SQLite - Database support for production and development
- PM2 - Process manager for production deployments
- Docker - Containerization for development and production
- ESLint & Prettier - Linting and code formatting
- Jest & Supertest - Testing framework for unit and integration tests
- Husky & Lint-Staged - Git hooks for enforcing best practices
Installation
Using npx
npx @vaibhavsaini/create-express-quickstart
cd my-app
npm installClone the Repository
git clone git@github.com:imVSaini/express-quickstart.git my-app
cd my-app
npm installUsage
Development Mode
npm run serverProduction Mode
npm startRunning with PM2
npm run pm2:startRunning with Docker
npm run docker:dev # Development
npm run docker:prod # ProductionDatabase Migrations & Seeding
Creating a New Migration
npm run migrate:makeRunning Migrations (Production)
npm run migrate:latestRunning Migrations (Development)
npm run migrate:upRolling Back Migrations (Development)
npm run migrate:downRolling Back Migrations (Production)
npm run migrate:rollbackCreating Seed Data
npm run seed:makeRunning Seeders (Development)
npm run seedRunning Seeders (Production)
npm run seed:runSQLite Note
If you want to use SQLite, make sure to create a .tmp directory in the root of your project.
Linting & Formatting
Linting
npm run lintFix Linting Issues
npm run lint:fixPrettier Formatting
npm run prettierAuto-fix Formatting Issues
npm run prettier:fixTesting
Run Tests
npm testWatch Mode
npm run test:watchTest Coverage
npm run coverageContributing
Contributions are welcome! Please follow the existing coding style and submit pull requests for improvements.
License
This project is licensed under the MIT License.
Created by Vaibhav Saini
1.0.0
7 months ago