diff --git a/server.js b/server.js index 40196d6..7b49f90 100644 --- a/server.js +++ b/server.js @@ -17,6 +17,7 @@ fastify.get("/", function(request, reply) { return reply.sendFile('index.html') }); + // Our API route, fastify automatically turns it to JSON fastify.get("/api/flavors", function(request, reply) { reply.send({ hello: 'world' }) diff --git a/src/api/flavors.js b/src/api/flavors.js index e69de29..5bf678e 100644 --- a/src/api/flavors.js +++ b/src/api/flavors.js @@ -0,0 +1 @@ +const flavors = { } \ No newline at end of file