Skip to content

Instantly share code, notes, and snippets.

@overra
Last active January 2, 2019 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save overra/0934ab740b476aa7f0c028621a18a6c6 to your computer and use it in GitHub Desktop.
Save overra/0934ab740b476aa7f0c028621a18a6c6 to your computer and use it in GitHub Desktop.
Basic node usage on now v2
const { send } = require('micro')
module.exports = (req, res) => send(res, 200, 'hello world!')
{
"version": 2,
"builds": [{"src": "index.js", "use" : "@now/node"}],
"routes": [{"src": "/", "dest": "index.js"}]
}
{
"dependencies": {
"micro": "latest"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment