generated from nhcarrigan/template
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
"license": "ISC",
|
||||
"packageManager": "pnpm@10.17.0",
|
||||
"dependencies": {
|
||||
"@fastify/cors": "11.1.0",
|
||||
"@nhcarrigan/logger": "1.0.0",
|
||||
"fastify": "5.6.1"
|
||||
},
|
||||
|
||||
Generated
+16
@@ -8,6 +8,9 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@fastify/cors':
|
||||
specifier: 11.1.0
|
||||
version: 11.1.0
|
||||
'@nhcarrigan/logger':
|
||||
specifier: 1.0.0
|
||||
version: 1.0.0
|
||||
@@ -503,6 +506,9 @@ packages:
|
||||
'@fastify/ajv-compiler@4.0.2':
|
||||
resolution: {integrity: sha512-Rkiu/8wIjpsf46Rr+Fitd3HRP+VsxUFDDeag0hs9L0ksfnwx2g7SPQQTFL0E8Qv+rfXzQOxBJnjUB9ITUDjfWQ==}
|
||||
|
||||
'@fastify/cors@11.1.0':
|
||||
resolution: {integrity: sha512-sUw8ed8wP2SouWZTIbA7V2OQtMNpLj2W6qJOYhNdcmINTu6gsxVYXjQiM9mdi8UUDlcoDDJ/W2syPo1WB2QjYA==}
|
||||
|
||||
'@fastify/error@4.2.0':
|
||||
resolution: {integrity: sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ==}
|
||||
|
||||
@@ -1429,6 +1435,9 @@ packages:
|
||||
fast-uri@3.1.0:
|
||||
resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==}
|
||||
|
||||
fastify-plugin@5.0.1:
|
||||
resolution: {integrity: sha512-HCxs+YnRaWzCl+cWRYFnHmeRFyR5GVnJTAaCJQiYzQSDwK9MgJdyAsuL3nh0EWRCYMgQ5MeziymvmAhUHYHDUQ==}
|
||||
|
||||
fastify@5.6.1:
|
||||
resolution: {integrity: sha512-WjjlOciBF0K8pDUPZoGPhqhKrQJ02I8DKaDIfO51EL0kbSMwQFl85cRwhOvmSDWoukNOdTo27gLN549pLCcH7Q==}
|
||||
|
||||
@@ -2978,6 +2987,11 @@ snapshots:
|
||||
ajv-formats: 3.0.1(ajv@8.17.1)
|
||||
fast-uri: 3.1.0
|
||||
|
||||
'@fastify/cors@11.1.0':
|
||||
dependencies:
|
||||
fastify-plugin: 5.0.1
|
||||
toad-cache: 3.7.0
|
||||
|
||||
'@fastify/error@4.2.0': {}
|
||||
|
||||
'@fastify/fast-json-stringify-compiler@5.0.3':
|
||||
@@ -4181,6 +4195,8 @@ snapshots:
|
||||
|
||||
fast-uri@3.1.0: {}
|
||||
|
||||
fastify-plugin@5.0.1: {}
|
||||
|
||||
fastify@5.6.1:
|
||||
dependencies:
|
||||
'@fastify/ajv-compiler': 4.0.2
|
||||
|
||||
@@ -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