Skip to content

Instantly share code, notes, and snippets.

@harrietty
Last active December 17, 2017 18:18
Show Gist options
  • Select an option

  • Save harrietty/c7e0ee721e09c37fd2b7be1e8a1d5d10 to your computer and use it in GitHub Desktop.

Select an option

Save harrietty/c7e0ee721e09c37fd2b7be1e8a1d5d10 to your computer and use it in GitHub Desktop.
Hexpress.prototype.listen = function (...args) {
const nodeServer = http.createServer((req, res) => {
res = addResMethods(res);
// now we have more methods to use!
res.status(200).send('Can I tempt you with a half price cauldron?');
});
nodeServer.listen(...args);
return nodeServer;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment