🏝🐈 Checkpoint

./server.js:617503/197
This commit is contained in:
Glitch (hello-express)
2020-10-23 19:23:14 +00:00
parent 1231e6f4ac
commit 46972e6995
+8
View File
@@ -1,8 +1,16 @@
const path = require('path')
// Require the framework and instantiate it
const fastify = require("fastify")({
logger: true
});
// Setup our static files
fastify.register(require('fastify-static'), {
root: path.join(__dirname, 'public'),
prefix: '/public/', // optional: default '/'
})
// Declare a route
fastify.get("/", function(request, reply) {
reply.send({ hello: "world" });