Skip to content

Instantly share code, notes, and snippets.

@sam-github
Created October 2, 2015 23:32
Show Gist options
  • Save sam-github/37c64fd5d89c03bb8c18 to your computer and use it in GitHub Desktop.
Save sam-github/37c64fd5d89c03bb8c18 to your computer and use it in GitHub Desktop.
'use strict';
var express = require('express');
var version = require('./package.json').version;
module.exports = function() {
var app = express();
app.get('/', function(req, res) {
res.send('Hello World, v' + version);
});
app.get('/api', function(req, res) {
res.json({
cwd: process.cwd(),
message: 'Hello World',
pid: process.pid,
version: version,
});
});
return app;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment