d4d-express-sql-boilerplate backend is a server side element to handle apis. Runs with SQL databases, Use TypeORM, JWT authentication & seeders and migrations.
- Run :
npm install
- Setup your environment configurations after creating an .env file in the src folder :
cp .env.example .env
- Finally Run :
npm run dev
By default, there's a default user that can be used to login. His details can be found in the .env
file.
If you need to seed data to your database, run the following command :
npm run seed
By default, the model is synchronized with database. All old columns will be deleted if they are not present in the new model. You can change this behavior by setting the DB_SYNC
environment variable to 0
in the .env
file.
Anyway this behavior should be used ONLY for development purposes.
In production, I recommend using migrations.
npm run migration:create
npm run migration:generate
npm run migration:up
npm run migration:down
Check /postman
folder to get exported postman collection
- Add swagger documentation
- DevOps features
- Unit testing
Feel free to contribute on GitHub