generated from nhcarrigan/template
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import cors from "@fastify/cors";
|
||||
import fastify from "fastify";
|
||||
import { buildRoutes } from "./modules/buildRoutes.js";
|
||||
import { logger } from "./utils/logger.js";
|
||||
@@ -12,6 +13,10 @@ const server = fastify({
|
||||
logger: false,
|
||||
});
|
||||
|
||||
server.register(cors, {
|
||||
origin: true,
|
||||
});
|
||||
|
||||
await buildRoutes(server);
|
||||
|
||||
server.get("/", async(_request, response) => {
|
||||
|
||||
Reference in New Issue
Block a user