Skip to content

lgrcyanny/node-express-mysql-scaffolding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Express MySQL Scaffolding Overview

There are many node scaffoldings based on Mongoddb, but MySQL is rare. This is a simple scaffolding built on express and mysql.

Author

Features

  1. Register with fullname, 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.

Install

NOTE: You need to have node.js, mysql 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 config.js;

  1. Install MySQL server[http://dev.mysql.com/downloads/]

  2. Start MySQL service

  3. Build the database

  $ mysql -u root -p
  > create database scaffolding
  > quit
  $ mysql -u root -pyourpassword scaffolding < scaffolding.sql
  1. Start Server
  $ npm start
  1. Then visit http://localhost:3000/

Related modules

Thanks node-express-mongoose-demo, it's a great scaffolding, but it still took me 2 days to migrate the mongodb based scaffolding to MySQL

Directory structure

-app/
  |__controllers/
  |__models/
  |__mailer/
  |__views/
-config/
  |__routes.js
  |__config.js
  |__passport.js (auth config)
  |__express.js (express.js configs)
  |__middlewares/ (custom middlewares)
-public/

Tests

Tests are not shipped now, I will write tests later.

$ npm test

License

(The MIT License)

About

A basic and simple basic scaffolding based on Node.js Express and MySQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published