Port from .env

This commit is contained in:
2023-05-09 22:10:44 +03:00
parent a341d01f0c
commit 857ddb7124

View File

@@ -1,8 +1,9 @@
const PORT = process.env.PORT
const BOT_TOKEN = process.env.BOT_TOKEN as string const BOT_TOKEN = process.env.BOT_TOKEN as string
const CHAT_ID = process.env.CHAT_ID as string const CHAT_ID = process.env.CHAT_ID as string
const server = Bun.serve({ const server = Bun.serve({
port: 3000, port: PORT,
async fetch(req) { async fetch(req) {
if (!req.body) { if (!req.body) {
throw new Error("woops!"); throw new Error("woops!");