-
start both frontend and backend with NPM package concurrently. Frontend local port is setup in frontend/package.json under "scripts: {start}".
-
Then backend/package.json has a script named nodemon" that starts nodemon. The root level package.json has a script named "start-all" that can launch both scripts in frontend and backend.
-
both front and back ends can thus be launched by running npm run start-all in the root level
- in frontend see URL variable in api/api-calls.js
- in backend see .env with the environment variables
- The CORS options that allows API calls from the frontend are inside the backend folder: startup/routes.js.
- Local value is the LOCAL_FRONTEND_URL environment variable
- Disabling autoindex in mongoose connect options might enhance performance, setting is in the backend folder: startup/connect-db.js
- These folders are in the backend: startup/dev.js and startup/prod.js
- Uses morgan module for logging purposes
- Uses helmet module for web security and compression to compress requests
- Use route.use(passport.initialize()) instead of app.use(). See issue.