Start add account endpoint

This commit is contained in:
2020-05-01 17:32:46 +02:00
parent 8465c4ecd6
commit 7e4d186446
9 changed files with 84 additions and 34 deletions

5
data/dbConfig.js Normal file
View File

@@ -0,0 +1,5 @@
const pgp = require('pg-promise')();
const db = pgp(process.env.DATABASE_URL);
module.exports = db;

View File

@@ -0,0 +1,5 @@
## How to do a migration
- Create `.env` to the root folder
- Add the database url to the `.env` file:
`DATABASE_URL=postgres://username:password@host:port/database`
- Run `npm run migrate up`