NodeJS Express backend powering the REST API for the app
- Clone repo
cd Laughable-Lyrics/backend
npm install
- Install and start mysql database (Mac, Windows)
- Copy the env file:
cp .env.example .env
- fill in all of the secret values, including your local database info - Download gcp credentials file from Google Cloud Platform Console after setting up a translation project, and specify this file's location in the GOOGLE_APPLICATION_CREDENTIALS environmental variable in .env
- Specify your GCP project ID in GOOGLE_PROJECT_ID environmental variable in .env
- Run script to create database and tables:
./src/database/migrate.sh
- Start the server:
- Normal start:
npm run start
- Auto reload when files are changed:
npm run watch
(requires nodemon -npm install -g nodemon
)
- Normal start: