This repository builds a RESTful API and databases, to allow the WAX music review app to access music, user data and reviews. Relational data is stored on a PostgreSQL database, while non-relational user data is stored securely on MongoDB Atlas.
Clone the project
git clone https://github.com/royr5/wax-backend.git
Go to the project directory
cd wax-backend
Install dependencies
npm install
Create two new files .env.test and .env.development to set up the environment variables
.env.test
PGDATABASE=gatefold_api_test
# Spotify
# Replace the following with your own Spotify API details
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
SPOTIFY_REFRESH_TOKEN=your_spotify_refresh_token
.env.dev
PGDATABASE=gatefold_api
# Spotify
# Replace the following with your own Spotify API details
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
SPOTIFY_REFRESH_TOKEN=your_spotify_refresh_token
Setup the database
npm run setup-db
Seed the database
npm run seed-dev
Run tests
npm run test
- RESTful API: Handles user authentication, music data, and more.
- Postgres Database: Main relational data storage.
- AWS Lambda Function .
- MongoDB Atlas: Secured database for sensitive user data.
- Security Measures: Passwords hashed and salted with Bcrypt.
- Jest and Supertest for testing
The frontend code for this project can be found in the wax-frontend repository.