https://github.com/yaasiin-ayeva/d4d-express-sql-boilerplate
Dev4Diversity Express API Boilerplate is a server side element to handle apis. Runs with SQL databases, Use TypeORM, JWT authentication, decorators & Custom seeders.
https://github.com/yaasiin-ayeva/d4d-express-sql-boilerplate
api-rest boilerplate-template clean-architecture dev4diversity express sql typeorm typescript
Last synced: 5 months ago
JSON representation
Dev4Diversity Express API Boilerplate is a server side element to handle apis. Runs with SQL databases, Use TypeORM, JWT authentication, decorators & Custom seeders.
- Host: GitHub
- URL: https://github.com/yaasiin-ayeva/d4d-express-sql-boilerplate
- Owner: yaasiin-ayeva
- License: mit
- Created: 2024-02-08T09:56:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-27T11:19:51.000Z (7 months ago)
- Last Synced: 2024-11-07T04:52:08.423Z (6 months ago)
- Topics: api-rest, boilerplate-template, clean-architecture, dev4diversity, express, sql, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 1.14 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# d4d-express-sql-boilerplate
d4d-express-sql-boilerplate backend is a server side element to handle apis. Runs with SQL databases, Use TypeORM, JWT authentication & seeders and migrations.
# Steps to run this project:
1. Run :
```bash
npm install
```2. Setup your environment configurations after creating an .env file in the src folder :
```bash
cp .env.example .env
```3. Finally Run :
```bash
npm run dev
```## Seeding data to your database
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 :
```bash
npm run seed
```## Migrations
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.
```bash
npm run migration:create
npm run migration:generate
npm run migration:up
npm run migration:down
```## IMPORTANT
Check `/postman` folder to get exported postman collection
[link-author]: https://github.com/yaasiin-ayeva
## TODO
- Add swagger documentation
- DevOps features
- Unit testingFeel free to contribute on [GitHub](https://github.com/yaasiin-ayeva/d4d-express-sql-boilerplate)