var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.json({'name':'test'}) }); router.post('/', function(req, res, next) { console.info(req.body) res.json({'name':'666'}) }); module.exports = router;