Skip to content

Commit 784c69d

Browse files
authored
Merge pull request #5 from jenniekibiri/signup
implement signup API
2 parents 0807fa9 + 1613a92 commit 784c69d

File tree

15 files changed

+4187
-4584
lines changed

15 files changed

+4187
-4584
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"presets": ["@babel/preset-env"]
2+
"presets": ["@babel/preset-env"],
3+
"plugins": ["@babel/transform-runtime"]
34
}

.env.sample

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
DB_URL_DEV=postgres://database_username:password@localhost:5432/database_name
1+
user=<database user>
2+
password=<database password>
3+
database=<database name>
4+
host=localhost
5+
dbport=5432
6+
secret=<any secure string of your choice>

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2020: true,
5+
node: true,
6+
},
7+
extends: [
8+
'airbnb-base',
9+
],
10+
parserOptions: {
11+
ecmaVersion: 11,
12+
sourceType: 'module',
13+
},
14+
rules: {
15+
},
16+
};

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A simple authentication API for the [books gallery app](https://github.com/she-c
2222
### Database Setup
2323
1. Create a Postgres database for your local development with any name of your choice.
2424
25-
2. Create a `.env` file in the root directory using the sample `.env.sample` file and update the database URL with your connection credentials
25+
2. Create a `.env` file in the root directory by copying the [sample file](.env.sample) and updating the database variables with your connection credentials, as well as the JWT signing secret.
2626
2727
2. Globally install sequelize cli
2828
```

app.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
{
88
"url": "heroku/nodejs"
99
}
10-
]
10+
],
11+
"scripts": {
12+
"postdeploy": "./node_modules/.bin/sequelize db:migrate"
13+
}
1114
}

0 commit comments

Comments
 (0)