https://github.com/json2d/bookr-api
backend for book sharing platform
https://github.com/json2d/bookr-api
Last synced: 3 months ago
JSON representation
backend for book sharing platform
- Host: GitHub
- URL: https://github.com/json2d/bookr-api
- Owner: json2d
- Created: 2018-06-14T23:05:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-15T00:17:07.000Z (about 7 years ago)
- Last Synced: 2025-02-07T04:42:08.422Z (5 months ago)
- Language: JavaScript
- Size: 350 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bookr-api
Check out the API doc [here]( https://bitstrider.github.io/bookr-api/), generated by [`apidoc`]### Configuration
To run this app, you'll need to create a `.env` file in the root project directory to define the required environment variables. The file `sample.env` is included as a template:
```
PORT=3000
DB_URI=?JWT_SECRET="this is a secret"
JWT_EXPIRE_IN_SECS=600AWS_ACCESS_KEY_ID=?
AWS_SECRET_ACCESS_KEY=?
AWS_REGION=?
EMAIL_SENDER=?
```Here are some descriptions for the less obvious ones:
- `DB_URI` - path to mongodb
- `JWT_SECRET` - key for signing tokens
- `JWT_EXPIRE_IN_SECS` - time to expiry for generated tokens
- `EMAIL_SENDER` - email address to send system message from### Testing
Test cases written with [`mocha`](https://github.com/mochajs/mocha) and [`supertest`](https://github.com/visionmedia/supertest), with help from [`faker`](https://github.com/marak/Faker.js/). To in the console simply run:
```
$ npm i
$ npm test
```