An open API service indexing awesome lists of open source software.

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.

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 testing

Feel free to contribute on [GitHub](https://github.com/yaasiin-ayeva/d4d-express-sql-boilerplate)