This commit is contained in:
2025-08-07 19:16:57 -04:00
parent e9b8258fd9
commit a90a914d2f
3 changed files with 12 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
"type": "module",
"version": "0.0.2",
"scripts": {
"dev": "vite",
"dev": "vite --port 3000",
"build": "vite build"
},
"dependencies": {

View File

@@ -1,8 +1,8 @@
{
"name": "server",
"scripts": {
"dev": "bun run --hot src/index.ts",
"start": "bun run src/index.ts",
"dev": "NODE_ENV=development bun run --hot --port 5001 src/index.ts",
"start": "NODE_ENV=production bun run --port 5001 src/index.ts",
"dbstudio": "pnpm dlx prisma studio --browser none",
"dbdeploy": "pnpm dlx prisma migrate deploy",
"dbsync": "concurrently 'pnpm dlx prisma generate' 'pnpm dlx prisma migrate dev'"

View File

@@ -2,14 +2,15 @@ import { Hono } from "hono";
import { serveStatic } from "hono/bun";
const app = new Hono();
const isDev = Bun.env.HONO_ENV === "development";
const isDev = Bun.env.NODE_ENV === "development";
const isProd = Bun.env.NODE_ENV === "production";
app.use(
isProd &&
app.use(
"*",
serveStatic({
path: "./dist",
root: "./dist",
})
);
);
console.log("server running");
export default app;