There are many node scaffoldings based on Mongoddb, but MySQL is rare. This is a simple scaffolding built on express and mysql.
1. Register with fullname,username, email, passord, very simple
2. Login with passport-local strategy
3. Twitter Bootstrap Support
Note: I just want keep the scaffolding clean, no more complex function, and keep it flexible.
NOTE: You need to have node.js, MySQL Server installed
1. Clone the project
$ git clone https://github.com/lgrcyanny/node-express-mysql-scaffolding.git
$ npm install
$ cp config/config.disk.js config/config.js
Please config your MySQL in the
2. Install MySQL server
3. Start MySQL service
4. Build the database
$ mysql -u root -p
> create database scaffolding
$ mysql -u root -pyourpassword scaffolding < scaffolding.sql
5. Start Node.js Server
$ npm start
6. Then visit http://localhost:3000/
Thanks to node-express-mongoose-demo, it’s a great scaffolding, but it still took me 2 days to migrate from MongoDB based scaffolding to MySQL scaffolding, and the node-express-mongoose-demo has too many Login Support which is too complicated.
|passport.js (auth config)
|express.js (express.js configs)
|__middlewares/ (custom middlewares)
Tests are not shipped now, I will write tests later.
$ npm test
(The MIT License)