var express = require('express');
var bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
//======model
var Person = require('../model').Person;
var msUser = require('../model').msUser;
var restfulHelper = require('../index');
var router =express.Router();
console.log(restfulHelper);
app.use(restfulHelper.crud(router,msUser));
app.use(restfulHelper.auth(router,msUser,{
"authorizeKey":"msUserName",
"accessKey":"msPassword"
}));
app.get('/test',function(req,res){
res.send("Hello");
});
-
Notifications
You must be signed in to change notification settings - Fork 0
Kenshinhu/mongoose-express-restfulhelper
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Mongoose Restful webAPI by ExpressJS
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published