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':'test'}) }); module.exports = router;