Skip to content

Instantly share code, notes, and snippets.

@segaz2002
Last active April 9, 2018 21:15
Show Gist options
  • Save segaz2002/04933caa8a7dc5dd232842ad0528c42e to your computer and use it in GitHub Desktop.
Save segaz2002/04933caa8a7dc5dd232842ad0528c42e to your computer and use it in GitHub Desktop.
module HelloService {
const restify = require('restify');
const server = <any>restify.createServer({
name: 'hello-service',
version: '0.0.1'
});
const port = 4000;
server.use(restify.plugins.bodyParser());
server.use(decodeRequest);
server.get('/', (request, response, next) => {
response.send('Hello');
return next();
});
server.listen(port, function () {
console.log(`Listening on port ${port}`);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment