These steps describe how you can deploy your app locally in production mode if you do not want to deploy your app online for free (see Deployment).
Make sure you have all dependencies installed for the server and client (using
npm install).
cd group-00-webNODE_ENV for the server:
export NODE_ENV=production (check with echo $NODE_ENV)set NODE_ENV "production" (check with echo %NODE_ENV%)MONGODB_URI for the server (change the database name “animals” according to your project):
export MONGODB_URI=mongodb://localhost:27017/animalProductionDBset MONGODB_URI "mongodb://localhost:27017/animalProductionDB"VUE_APP_API_ENDPOINT for the client production build:
export VUE_APP_API_ENDPOINT=http://localhost:3000/apiset VUE_APP_API_ENDPOINT "http://localhost:3000/api"npm run build --prefix clientnpm run start --prefix server➜ group-00-web git:(master) ✗ npm run start --prefix server
3:03:38 PM web.1 | Express server listening on port 3000, in production mode
3:03:38 PM web.1 | Backend: http://localhost:3000/api/
3:03:38 PM web.1 | Frontend (production): http://localhost:3000/
3:03:38 PM web.1 | Connected to MongoDB with URI: mongodb://localhost:27017/animals-production