build ready (I hope)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -3,4 +3,8 @@ import solidPlugin from "vite-plugin-solid";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [solidPlugin()],
|
||||
build: {
|
||||
outDir: "../server/public",
|
||||
emptyOutDir: true,
|
||||
},
|
||||
});
|
||||
|
||||
1
packages/server/.gitignore
vendored
1
packages/server/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
# deps
|
||||
node_modules/
|
||||
public
|
||||
@@ -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",
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
7
packages/shared/package.json
Normal file
7
packages/shared/package.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "@games/shared",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"object-hash": "^3.0.0"
|
||||
}
|
||||
}
|
||||
6
packages/shared/tsconfig.json
Normal file
6
packages/shared/tsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user