- Target : Javascript (NodeJS)
- Library : restify
- Last tested version : 4.0.4
- Available on : Web - Github - NPM
- Plugins :
import js.restify.*;
class Main
{
static function main()
{
function respond(request : Request, response : Response, next : NextCallback) : Void {
response.send('hello ${request.params.name}');
next();
}
var server = Restify.createServer();
server.get('/hello/:name', respond);
server.head('/hello/:name', respond);
server.listen(8080, function() {
trace('${server.name} listening at ${server.url}');
});
}
}