Changable port

This commit is contained in:
Lncvrt committed 2025-08-29 00:17:55 -07:00
1 parent 74cbd0e529
commit af5f35006f
4 files changed
+10 -2

No files matched your search

+1
View File
@@ -0,0 +1 @@
PORT=3000
+3
View File
@@ -5,6 +5,7 @@
"name": "berrydash-api", "name": "berrydash-api",
"dependencies": { "dependencies": {
"canvas": "3.2.0", "canvas": "3.2.0",
"dotenv": "17.2.1",
}, },
"devDependencies": { "devDependencies": {
"@types/bun": "1.2.21", "@types/bun": "1.2.21",
@@ -41,6 +42,8 @@
"detect-libc": ["detect-libc@2.0.4", "", {}, "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA=="], "detect-libc": ["detect-libc@2.0.4", "", {}, "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA=="],
"dotenv": ["dotenv@17.2.1", "", {}, "sha512-kQhDYKZecqnM0fCnzI5eIv5L4cAe/iRI+HqMbO/hbRdTAeXDG+M9FjipUxNfbARuEg4iHIbhnhs78BCHNbSxEQ=="],
"end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="], "end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="],
"expand-template": ["expand-template@2.0.3", "", {}, "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="], "expand-template": ["expand-template@2.0.3", "", {}, "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="],
+2 -1
View File
@@ -10,6 +10,7 @@
"private": true, "private": true,
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"canvas": "3.2.0" "canvas": "3.2.0",
"dotenv": "17.2.1"
} }
} }
+4 -1
View File
@@ -1,8 +1,9 @@
import path from "path"; import path from "path";
import { createCanvas, loadImage } from "canvas"; import { createCanvas, loadImage } from "canvas";
import "dotenv/config";
Bun.serve({ Bun.serve({
port: 3000, port: process.env.PORT,
routes: { routes: {
"/icon": { "/icon": {
async GET(req: Bun.BunRequest) { async GET(req: Bun.BunRequest) {
@@ -144,3 +145,5 @@ Bun.serve({
}, },
}, },
}); });
console.log("Server started on port " + process.env.PORT);