👉 Starter with Vanilla JS
& Express
& Webpack
& Babel
for Web Server and Client dev
✅ Express v4.16.1
✅ Webpack v4.44.2
✅ Babel (Core) v7.11.6
✅ Support syntax ES2015+
✅ Client file will be stored in /dist
after build
✅ Static directory dist/
✅ Serving Static Files in Express.js
.
├── Client
│ ├── components
│ ├── index.js
│ ├── pages
│ │ └── indexPage
│ │ ├── index.css
│ │ ├── index.html
│ │ └── index.js
│ └── services
│
├── Server
│ ├── app.js
│ ├── config
│ ├── middleware
│ ├── models
│ └── routes
│ ├── api
│ └── index.js
├── README.md
├── nodemon.json
├── package-lock.json
├── package.json
├── webpack.config.dev.js
└── webpack.config.prod.js
npm run build-dev # Development mode
npm run build-prod # Production mode
npm run dev # Use webpack, express and babel with nodemon
npm run start # Use webpack, express and babel
/* .env file location */
# development mode => /.env.dev
# production mode => /.env.prod