CAC_v2
Description
This is a total new version ChenACcount based on:
-
multiple front-end, e.g. IOS, Web, Android,
-
Node.js server
-
MySQL database.
Collaborateur: Jianan Xing, Yanwen Ni, Bowen Chen, Chen Xie.
Environment
###Apache & MySQL & phpMyAdmin
-
OSX
###Node.js & npm
#check node.js and npm version
node -v
npm -v
#fix npm permission problem
sudo chown -R `whoami` /usr/local
#install npm-cli
npm install npm -g
Controller
Login & Signup & Security
-
login
check cookie, if exist go to dashboard, else login and save to cookie
-
register
after register, jump to login
-
logout
clear cookie and jump to login
-
dashboard
check cookie, if valid go to dashboard, else go to login
*Extral: cross sit security
Models
Setup
-
install project package.json
npm install
-
config
models/dbconfig.js
#to find where is mysql.socket mysqladmin -u root -p variables | grep socket
-
run node.js database create script
npm run-script createdb