Example developing a Rest Server using NodeJs, Restifity, MySQL and Sequelize ORM
- Restifity
- Sequelize
- node: 0.10.x
- npm: 1.4.x
$ npm install
$ node src/app/app.js
$ mocha src/ --recursive
- Set up MySQL and create an empty database called sequelize (the app is going to create the tables (init-db.js))
- Configure MySQL connection on DataBase section (app.js)
- You can access to all Resources (users, personals, permissions, roles)
with the format:
GET http://localhost:3000/api/[resource]
GET http://localhost:3000/api/[resource]/[id]
POST http://localhost:3000/api/[resource]/new
PUT http://localhost:3000/api/[resource]/[id]
example GET http://localhost:3000/api/users