aboutsummaryrefslogtreecommitdiffstats
path: root/lib/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-03-11 10:20:46 -0800
committerAdam Soltys <[email protected]>2023-03-11 10:20:46 -0800
commit5955ff6969a5301c4413631b76cf2300d193f8ed (patch)
tree92d1269a098cb7c764ca92f7a40af9ee236ae5b1 /lib/app.js
parent7fec7cc3e7c51a9892869732b5bfe65922ee7818 (diff)
downloadcoinos-server-5955ff6969a5301c4413631b76cf2300d193f8ed.tar.gz
coinos-server-5955ff6969a5301c4413631b76cf2300d193f8ed.zip
separate tips from amounts
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/app.js b/lib/app.js
index eaef00d1..ae1687a4 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -15,11 +15,11 @@ import { socketServer } from "$lib/sockets";
const app = fastify({
logger: pino(),
disableRequestLogging: true,
- maxParamLength: 500
+ maxParamLength: 500,
});
app.register(fastifySecureSession, {
- key: Buffer.from(config.jwt, "hex")
+ key: Buffer.from(config.jwt, "hex"),
});
app.register(fastifyPassport.initialize());
@@ -31,7 +31,7 @@ app.register(fastifyMultipart);
app.register(fastifyStatic, {
root: path.join("/app/data/uploads"),
- prefix: "/public/"
+ prefix: "/public/",
});
app.register(fastifyWs);
@@ -39,17 +39,14 @@ app.register(socketServer);
app.setErrorHandler((error, request, reply) => {
if (error instanceof fastify.errorCodes.FST_ERR_BAD_STATUS_CODE) {
- reply.status(500).send({ ok: false })
+ reply.status(500).send({ ok: false });
} else {
- reply.send(error)
+ reply.send(error);
}
-})
+});
app.setNotFoundHandler((request, reply) => {
- reply
- .code(404)
- .type("text/html")
- .send("Not Found");
+ reply.code(404).type("text/html").send("Not Found");
});
export default app;