Created
January 9, 2020 07:21
-
-
Save Wenangsani/2c029082716d23a627b94c3f4f58b332 to your computer and use it in GitHub Desktop.
Fastify for Netlify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const fastify = require("fastify"); | |
const app = fastify(); | |
const serverless = require("serverless-http"); | |
app.get("/test", (request, reply) => { | |
reply.send({ hello: "world" }); | |
}); | |
app.get("/test/one", (request, reply) => { | |
reply.send({ hello: "world" }); | |
}); | |
module.exports.handler = serverless(app); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment