Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create Controller Logic
'use strict';
var properties = required('../package.json');
var distance = require('../service/distance');
var controllers = {
about: function(req,res){
var aboutInfo = { name:properties.name, version: properties.version }
res.json(aboutInfo);
},
get_distance: function(req, res){
distance.find(req, res, function(err,dist){
if(err) res.send(err); res.json(dist);
});
},
};
module.exports = controllers;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.