When I start a development of a "Minimum Viable Product" orientend to web using node.js and express.js I always start doing the same things. So I decide to create a repo with all this things ready to go.
- Setup Express.js
- Structure directories Routes, Controllers, Views and Libs
- Add MongoDB query string
- Add Bootstrap, jquery, Angular, etc
- Install some security modules (helmet for Headers)
- Add a basic bootstrap template with header, footer, menubar, etc
- Local User Registration
- Log-in for local users with Passportjs
- Enable/disable local login
- Log-in/Register for facebook users with Passportjs
- Enable/disable facebook login/register
- i18n
- Geoip Language
- Core e-mails lib
- Contact form
- Local User Register Confirmation enable/disable
- Forgot Password
- Newsletter suscription
- My account menu
- Update profile, picture, name, etc.
- Account settings (chage password and delete account)
- Email preferences
$ git clone git@github.com:hecore/node-express-miniapp.git
$ cd node-exppress-miniapp
$ npm install$ ./start.sh
(work in progress...)
default config--no need modify appconfig/routecfg.js appconfig/errcfg.js appconfig/local.js
append config--append by userself appconfig/commoncfg.js --通用第三方模块加载
current db -- mysql code loaction: extension/middleware/mysqldb/dbtool.js
mock.js --- 前端模拟数据 restdb.js ---测试rest数据(关联数据库)--提供测试db和通用传db名称接口 miniapp.js ---小程序对接rest接口(关联数据库)--使用通用传db名称接口
index.js --对接ejs路由 myaccount.js --ejs接口模板
cn encode.js -- 解决中文乱码