Restaurant Passport is an app for people that want to log what restaurants they have been to, as well as find new places in their area that they might be interested in but haven't heard of before. This repository serves as the backend for the project. See the Product Canvas for more information.
API documentation generated with ApiDoc
General:
- NodeJS backend.
- ExpressJS framework for the API.
- express-session session middleware for managing user state across requests.
Security
- CORS for Cross-Origin configuration.
- helmet for basic security adjustments to the server.
- bcrypt for encrypting/hashing sensitive user data.
Testing:
Database:
$ npm installThese are required to get the server working after install:
- NODE_ENV - production / development
- PORT - For heroku deployment
- DATABASE_ENV - testing / developing / production
- DATABASE_URL - Production database connection string (used by heroku)
- DATABASE_URL_DEV - development database connection string
- DATABASE_URL_TEST - testing database connection string
- JWT_SECRET - Key for encrypting JWTs
- HASH_SALT_ROUNDS - Salt rounds for bcrypt hashes
- YELP_API_KEY - Used by the /restaurants/search route
- YELP_API_SEARCH - URL for the yelp business search endpoint
# production mode
$ npm run start
# development mode
$ npm run start:dev# migrate database to latest
$ npm run db:latest
# rollback database migrations
$ npm run db:rollback
# seed the database
$ npm run db:seed# run endpoint tests
$ npm run test:e2e
# test coverage
$ npm run test:covThis project is MIT licensed