An backend app for user registration, login, logout, and for getting the restaurants near a location (city or coordinates).
- JavaScript
- Node.js
- Postgresql
- Express
- Clone the repository
- Start running your database locally or in cloud service as RDS
- Execute the ./sql.dump file to create the SQL schema
- Create a .env file inside the backend directory, with the following variables:
- DB_USER : The database user of step 2.
- DB_HOST : The database host of step 2.
- DB_DATABASE : The name of the database of step 2.
- DB_PASSWORD : The database password of step 2.
- DB_PORT : The port where database of step 2 is running.
- JWT_ACCESS_SECRET : A secure string to generate the access JWT.
- JWT_REFRESH_SECRET : A secure string to generate the refresh JWT.
- GOOGLE_API_KEY : Your google cloud API key, enabled for places and geocoding queries.
- Install backend dependencies and start running the backend project:
npm install
npm start
- You could test the queries using postman importing the ./restaurantApp.postman_collection.json, this collection have all the REST queries of this project. Remember replacing the access or refresh token on the authorization tab. (Only when it's necessary)
- Clone the repository
- Start running your test database locally or in cloud service as RDS
- Execute the ./sql.dump file to create the SQL schema
- Create a .env.test file inside the backend directory, with the following variables:
- DB_USER : The database user of step 2.
- DB_HOST : The database host of step 2.
- DB_DATABASE : The name of the database of step 2.
- DB_PASSWORD : The database password of step 2.
- DB_PORT : The port where database of step 2 is running.
- JWT_ACCESS_SECRET : A secure string to generate the access JWT.
- JWT_REFRESH_SECRET : A secure string to generate the refresh JWT.
- GOOGLE_API_KEY : Your google cloud API key, enabled for places and geocoding queries.
- TEST="True"
- Install backend dependencies and start executing the test:
npm install
npm run test