# express-webpack-template **Repository Path**: guanzhenxing/express-webpack-template ## Basic Information - **Project Name**: express-webpack-template - **Description**: A template for express with webpack. - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 16 - **Forks**: 3 - **Created**: 2016-04-06 - **Last Updated**: 2024-04-09 ## Categories & Tags **Categories**: javascript-toolkits **Tags**: None ## README ## express-webpack-template a Node.js express with webpack project template ### Overview - use express 4.* - use ES6/ES2015 =>https://babeljs.io - use connect-flash => https://github.com/jaredhanson/connect-flash - use express-session for session - use supervisor for live reload - use generic-pool as database connections pool - use cors => https://github.com/expressjs/cors - use morgan for HTTP request logger middleware - use es6-promise for promise/A+ - use multer for upload =>https://github.com/expressjs/multer - use lodash instead of underscore - use pm2 for deploy - use log4js => https://github.com/nomiddlename/log4js-node #### todo list - add mongoose - add test (mocha + chai + sinon) - add fetch => https://github.com/github/fetch - ... ### Directory Structure .
│── bin (for executable file)
│ └── webpack (for webpack config)
│ └── www (server file)
│── config (for config file)
│── utils (for utils )
│── middleware (for middleware)
│── models (for persistence module
│── public (for static file:css/image/js)
│── routes (just for routes)
│── services (for business logic)
│── test (for test)
│── utils (for util)
│── views (for view engine )
│── app.js (main file)
│── webpack.config.js (webpack config file)
### Install and Running 1. `git clone https://github.com/guanzhenxing/express-webpack-template.git` 2. `cd express-webpack-template` 3. `npm install` 4. `npm install supervisor -g` 5. `npm start` 6. `navigate to http://localhost:3000 in your browser of choice.` for compile : `npm run compile` for production : `npm run prod`