diff options
| author | Adam Soltys <[email protected]> | 2023-01-12 15:39:19 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-12 15:39:19 -0800 |
| commit | 29ae625ff0795d4efec128616714e14b1788ecf9 (patch) | |
| tree | 24deca2d746b7802b51792e109b8726641043da2 | |
| parent | b789098f484c83cee57cdb25bf3cade55ae457c3 (diff) | |
| download | coinos-server-29ae625ff0795d4efec128616714e14b1788ecf9.tar.gz coinos-server-29ae625ff0795d4efec128616714e14b1788ecf9.zip | |
bun and elysiabun-elysia
| -rw-r--r-- | Dockerfile | 1 | ||||
| -rw-r--r-- | app.js | 7 | ||||
| -rwxr-xr-x | bun.lockb | bin | 138296 -> 121532 bytes | |||
| -rw-r--r-- | index.js | 32 | ||||
| -rw-r--r-- | package.json | 7 |
5 files changed, 22 insertions, 25 deletions
@@ -4,6 +4,7 @@ ARG NODE_ENV=production ENV NODE_ENV $NODE_ENV RUN apk add --update inotify-tools vips-dev +RUN bun upgrade --canary COPY . /app WORKDIR /app @@ -1,4 +1,5 @@ -import fastify from "fastify"; -import pino from "pino"; +import { Elysia } from 'elysia' -export default fastify({ logger: pino(), disableRequestLogging: true, maxParamLength: 500 }); +const app = new Elysia() + +export default app; Binary files differ@@ -1,24 +1,24 @@ -import app from "./app"; -import { l, err } from "./lib/logging"; +import app from "app"; +// import { l, err } from "./lib/logging"; -import "./lib/redis"; -import "./lib/sockets"; -import "./lib/passport"; -import "./lib/upload"; -import "./lib/rates"; -import "./lib/notifications"; -import "./lib/mail"; -import "./lib/nostr"; +import "lib/redis"; +// import "lib/sockets"; +import "lib/passport"; +// import "lib/upload"; +import "lib/rates"; +import "lib/notifications"; +import "lib/mail"; +import "lib/nostr"; -import "./routes/locations"; -import "./routes/invoices"; -import "./routes/payments"; -import "./routes/users"; -import "./routes/requests"; +import "routes/locations"; +import "routes/invoices"; +import "routes/payments"; +import "routes/users"; +import "routes/requests"; let host = process.env.HOST || "0.0.0.0"; let port = process.env.PORT || 3119; app.listen({ host, port }, (e, h) => { - if (e) return err("Failed to start:", e.message); + // if (e) return err("Failed to start:", e.message); }); diff --git a/package.json b/package.json index 1f7f6981..3fe1b87f 100644 --- a/package.json +++ b/package.json @@ -7,15 +7,10 @@ "dev": "bun --hot index.js" }, "dependencies": { - "@fastify/multipart": "^7.1.2", - "@fastify/passport": "^2.2.0", - "@fastify/secure-session": "^5.2.0", - "@fastify/static": "^6.5.0", - "@fastify/websocket": "^7.0.1", "bcrypt": "^5.0.0", "clightning-client": "^0.1.2", "date-fns": "^2.21.3", - "fastify": "^4.5.3", + "elysia": "^0.1.2", "file-type": "^18.0.0", "got": "^12.5.3", "jsonwebtoken": "^8.5.1", |
