Created
October 2, 2015 23:32
-
-
Save sam-github/37c64fd5d89c03bb8c18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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