This API Game has build with express, nodejs and mongodb (mongoose)
Configuration API:
1- Configure the endpoint of the frontend.
file: .env
// CORS: define url frontend app (permit cors)
CORS_ORIGIN="http://localhost:4200"
2- Connection to MongoDB.
Configure connection to MongoDB:
file: .env
MONGODB_URI="mongodb://localhost:27017/veronica"
3- Revise and configure the port of the aplication. By default the app will be run on 8080.
file: .env
export PORT=8085
npm install
node server.js
Test in terminal:
sh test.api.sh