-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 853291b
Showing
16 changed files
with
4,821 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DB_URL_DEV=postgres://database_username:password@localhost:5432/database_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build/ | ||
node_modules/ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
"config": path.resolve('./src/config', 'config.js'), | ||
"models-path": path.resolve('./src/models'), | ||
"seeders-path": path.resolve('./src/seeders'), | ||
"migrations-path": path.resolve('./src/migrations') | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# book-gallery-api | ||
A simple authentication API for the books gallery app | ||
|
||
## Core Technologies | ||
1. NodeJS/Express | ||
2. Postgres/Sequelize ORM | ||
|
||
|
||
## To get started | ||
1. Clone the repository: | ||
``` | ||
git clone https://github.com/she-code-africa/WOSCA-book-gallery-api | ||
``` | ||
2. Ensure you have installed [NodeJS](https://nodejs.org/en/) and [Postgres](https://www.postgresql.org/download/) | ||
3. Navigate into the app's root directory: | ||
``` | ||
cd WOSCA-book-gallery-api | ||
``` | ||
### Database Setup | ||
1. Create a Postgres database for your local development with any name of your choice. | ||
2. Create a `.env` file in the root directory using the sample `.env.sample` file and update the database URL with your connection credentials | ||
2. Globally install sequelize cli | ||
``` | ||
npm install -g sequelize-cli | ||
``` | ||
3. Run migrations | ||
``` | ||
sequelize db:migrate | ||
``` | ||
### Development | ||
1. Install all dependencies: | ||
``` | ||
npm install | ||
``` | ||
2. Install all dependencies: | ||
``` | ||
npm run start:dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "book-gallery", | ||
"addons": [ | ||
"heroku-postgresql" | ||
], | ||
"buildpacks": [ | ||
{ | ||
"url": "heroku/nodejs" | ||
} | ||
] | ||
} |
Oops, something went wrong.