/boilerplate-express-webpack-babel

👉 Starter with Express & Webpack & Babel for Web Server and Client dev kit

Primary LanguageJavaScript

boilerplate-vanilla-express-webpack-babel-starter

👉 Starter with Vanilla JS & Express & Webpack & Babel for Web Server and Client dev


Features

✅ 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


Directory Structure

.
├── 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

How to build an application?

npm run build-dev     # Development mode
npm run build-prod    # Production mode

How to develop an application?

npm run dev     # Use webpack, express and babel with nodemon
npm run start   # Use webpack, express and babel

How to change dev/prod environment variable setting?

/* .env file location */

# development mode => /.env.dev
# production mode => /.env.prod