This is a template project for full stack development with React and Node.js. Javascript ES6 and ES7 syntax are also supported in this project.
- Node.js
- Express
- PM2
- Apollo Server with Express.js
- Webpack 5
- Babel 7
- .dev.env: config for development environment
- .prod.env: config for production environment
# development or production
NODE_ENV=
# MongoDB URL
MONGO_URL=
# Secret
TOKEN_SECRET=
To build or rebuild images
docker-compose build --no-cache
Aggregate containers
docker compose up
Aggregate containers and do not attach MongoDB service
docker compose up --no-attach mongo
yarn (or npm install)
yarn dev (or npm run dev)
The output objects will be generated in dist folder. You could modify the path in webpack.config(.*).js.
- Build
yarn build (or npm run build)
- Start
yarn start (or npm start)
- Start by PM2
pm2 startOrReload pm2.config.js --env production --update-env