build ready (I hope)

This commit is contained in:
2025-08-10 18:46:45 -04:00
parent 32c516bf37
commit a8a6d02cc7
12 changed files with 67 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
{
"name": "client",
"name": "@games/client",
"type": "module",
"version": "0.0.2",
"scripts": {
@@ -9,8 +9,8 @@
"dependencies": {
"@elysiajs/eden": "^1.3.2",
"@solidjs/router": "^0.15.3",
"hono": "^4.8.12",
"solid-js": "^1.9.5"
"solid-js": "^1.9.5",
"object-hash": "^3.0.0"
},
"devDependencies": {
"vite": "^7.0.6",

View File

@@ -3,4 +3,8 @@ import solidPlugin from "vite-plugin-solid";
export default defineConfig({
plugins: [solidPlugin()],
build: {
outDir: "../server/public",
emptyOutDir: true,
},
});

View File

@@ -1,2 +1,3 @@
# deps
node_modules/
public

View File

@@ -1,5 +1,5 @@
{
"name": "server",
"name": "@games/server",
"scripts": {
"dev": "concurrently 'pnpm run devserver' 'pnpm run dbstudio'",
"devserver": "NODE_ENV=development PORT=5001 bun run --hot src/index.ts",
@@ -8,17 +8,16 @@
"dbtypes": "pnpm dlx prisma generate",
"dbsync": "pnpm dlx prisma migrate dev",
"dbwipe": "pnpm dlx prisma migrate reset",
"start": "NODE_ENV=production PORT=5001 bun run src/index.ts"
"prod": "NODE_ENV=production bun run src/index.ts",
"start": "concurrently 'pnpm run prod' 'pnpm run dbstudio'"
},
"dependencies": {
"@elysiajs/cors": "^1.3.3",
"@elysiajs/static": "^1.3.0",
"@hono/zod-validator": "^0.7.2",
"@games/shared": "workspace:*",
"@prisma/client": "6.13.0",
"elysia": "^1.3.8",
"hono": "^4.8.12",
"object-hash": "^3.0.0",
"zod": "^4.0.15"
"object-hash": "^3.0.0"
},
"devDependencies": {
"@types/bun": "latest",

View File

@@ -6,7 +6,7 @@ import {
shuffle,
vCard,
} from "../../../shared/cards";
import { heq } from "../../../shared/utils";
import { heq } from "@games/shared/utils";
import { Elysia, t } from "elysia";
import { prisma } from "../db/db";

View File

@@ -17,7 +17,14 @@ const app = new Elysia()
})
.get("/ping", () => "pong")
.use(api)
.use(staticPlugin({ assets: "./dist", prefix: "" }))
.get("/*", () => Bun.file("./public/index.html"))
.use(
staticPlugin({
assets: "public",
prefix: "/",
alwaysStatic: true,
})
)
.listen(port);
console.log("server started on", port);

View File

@@ -1,4 +1,5 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"strict": true,
"jsx": "react-jsx",

View File

@@ -0,0 +1,7 @@
{
"name": "@games/shared",
"version": "1.0.0",
"dependencies": {
"object-hash": "^3.0.0"
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"esModuleInterop": true
}
}