- NodeJS 8.11.0
- PostgreSQL 10.0.0
Clone the repository and install the dependency:
$ git clone https://github.com/ralphcasipe1/express-bookshelf-api-starter.git <optional: other_name>
$ cd <application_name>
$ rm -rf .git # if it's terminal
$ remote-item .git # powershell
$ rd /s /q # windows command prompt
Copy .env.example
as .env
and update the application details and database credentials.
Run the migrations and seeds.
$ npm run migrate
$ npm run seed
Start the application in development.
$ npm run start:dev
Example:
$ npm run make:migration create_users_table
Example:
$ npm run make:seed insert_users
Install the driver first:
$ npm i sqlite3 # for sqlite
$ npm i mysql # for mysql
$ npm i mysql2 # for mysql 2
$ npm i oracle # for oracle
$ npm i mssql # for mssql
Update your .env
.
- DB_CLIENT=pg
+ DB_CLIENT=<name of the driver you installed>
Example:
DB_CLIENT=mysql
Please remove the pg driver if you don't need it.
This repository is under MIT License