diff options
| author | Adam Soltys <[email protected]> | 2023-01-17 12:33:17 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-17 12:33:17 -0800 |
| commit | 4b51fb8325acafac4e9231754dc58663f6431e1e (patch) | |
| tree | 20614504eb55d4620048c1875e26ccd1e4794a06 /app.js | |
| parent | 31823676432b637f2cd8314ca0e1ce890219b9b4 (diff) | |
| download | coinos-server-4b51fb8325acafac4e9231754dc58663f6431e1e.tar.gz coinos-server-4b51fb8325acafac4e9231754dc58663f6431e1e.zip | |
rename app
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/app.js b/app.js deleted file mode 100644 index af2bd59f..00000000 --- a/app.js +++ /dev/null @@ -1,40 +0,0 @@ -import config from "$config"; -import fastify from "fastify"; -import fastifyWs from "@fastify/websocket"; -import fastifyMultipart from "@fastify/multipart"; -import fastifyStatic from "@fastify/static"; -import fastifyPassport from "@fastify/passport"; -import fastifySecureSession from "@fastify/secure-session"; - -import path from "path"; -import pino from "pino"; - -import { jwtStrategy } from "$lib/auth"; -import { socketServer } from "$lib/sockets"; - -const app = fastify({ - logger: pino(), - disableRequestLogging: true, - maxParamLength: 500 -}); - -app.register(fastifySecureSession, { - key: Buffer.from(config.jwt, "hex") -}); - -app.register(fastifyPassport.initialize()); -app.register(fastifyPassport.secureSession()); - -fastifyPassport.use("jwt", jwtStrategy); - -app.register(fastifyMultipart); - -app.register(fastifyStatic, { - root: path.join("/app/uploads"), - prefix: "/public/" -}); - -app.register(fastifyWs); -app.register(socketServer); - -export default app; |
