X-Git-Url: https://git.r.bdr.sh/rbdr/generador-de-insultos/blobdiff_plain/1a652aac0ac1efc9100dd25e7da1105a4d515dc4..ecf7a1adea29df153a302effa79c3f2a8018c1e6:/bin/server.js?ds=sidebyside diff --git a/bin/server.js b/bin/server.js index b07aab4..2dbcc1d 100755 --- a/bin/server.js +++ b/bin/server.js @@ -32,6 +32,16 @@ server.route({ } }); +server.route({ + method: 'GET', + path:'/raw', + handler: function (request, reply) { + insults.generate().then(function (insult) { + reply(insult); + }); + } +}); + // Preload stuff, then run console.log("Loading template..."); fs.readFile(path.resolve(__dirname, '../ext/index.html'), {encoding: 'utf8'}, function (err, contents) {