This project extends the mousike project: https://github.com/behagoras/mousike
Create a mongo database and backup the db keys
Duplicate the .env.bak
, name It .env
and fill the environment variables with your mongo database information
cp .env.bak .env
Important fields:
DB_USER=
Fill It with a mongo database user with high privileges.DB_PASSWORD=
Fill It with the password for theDB_USER
declarated beforeDB_HOST=
Fill It with the cluster address, example:cluster-name.gcp.mongodb.net
DB_NAME=
Enter the database name in the cluster where every data will be filled.DB_PORT=
The mongo database, the default is27017
AUTH_JWT_SECRET=
Create a JSON Web Token Secret, you can use a online service like mkjwk https://mkjwk.org/AUTH_JWT_SECRET=
Create a 264 bits based key (You can use a service like keygen.io)googleCloudKeyFile.json
Use a generated Google Cloud KeyFile with writing access for the /api/images endpoint based on the googleCloudKeyFile.example.json
The rest environment variables are not important.
For finishing the setup just run the js scripts:
DEBUG=app:* node scripts/mongo/seedApiKeys.js
This bash script creates the api keys needed to authenticate the client and use the passport strategies.
DEBUG=app:* node scripts/mongo/seedProperties.js
This bash script creates all the needed songs
DEBUG=app:* node scripts/mongo/seedUsers.js
This bash script create an admin user and a not administrative user
npm install
npm run start