basic shape
This commit is contained in:
@@ -7,5 +7,4 @@ README.md
|
||||
.git
|
||||
.gitignore
|
||||
.dockerignore
|
||||
db
|
||||
*.db
|
||||
@@ -1,40 +0,0 @@
|
||||
FROM arm64v8/node:22 AS base
|
||||
ENV SHARP_IGNORE_GLOBAL_CLI_BINARIES=1
|
||||
ENV VIPS_DISABLE_DEPS=1
|
||||
ENV PNPM_SCRIPT_RUNNER_ALLOW_BUILD=true
|
||||
RUN corepack enable
|
||||
WORKDIR /app
|
||||
|
||||
FROM base AS builder
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --dangerously-allow-all-builds
|
||||
COPY . .
|
||||
# ^ copy source code
|
||||
RUN --mount=type=cache,target=/app/.vinxi pnpm run build
|
||||
# ^ produces .output (build artifact) and .vinxi (build cache)
|
||||
|
||||
|
||||
FROM base AS production_builder
|
||||
RUN apt-get update && apt-get install -y jq
|
||||
COPY --from=builder /app/package.json ./
|
||||
RUN jq 'del(.devDependencies)' package.json > package.prod.json
|
||||
COPY --from=builder /app/pnpm-lock.yaml ./
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile --dangerously-allow-all-builds
|
||||
|
||||
# Prod image
|
||||
FROM arm64v8/node:22-alpine
|
||||
ENV SHARP_IGNORE_GLOBAL_CLI_BINARIES=1
|
||||
ENV VIPS_DISABLE_DEPS=1
|
||||
ENV PNPM_SCRIPT_RUNNER_ALLOW_BUILD=true
|
||||
RUN corepack enable
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=production_builder /app/package.prod.json ./package.json
|
||||
COPY --from=production_builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||
|
||||
COPY --from=builder /app/.output ./.output
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "run", "start"]
|
||||
33
README.md
33
README.md
@@ -1,32 +1 @@
|
||||
# SolidStart
|
||||
|
||||
Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com);
|
||||
|
||||
## Creating a project
|
||||
|
||||
```bash
|
||||
# create a new project in the current directory
|
||||
npm init solid@latest
|
||||
|
||||
# create a new project in my-app
|
||||
npm init solid@latest my-app
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
Solid apps are built with _presets_, which optimise your project for deployment to different environments.
|
||||
|
||||
By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`.
|
||||
|
||||
## This project was created with the [Solid CLI](https://github.com/solidjs-community/solid-cli)
|
||||
games!
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import { defineConfig } from "@solidjs/start/config";
|
||||
|
||||
export default defineConfig({});
|
||||
25
package.json
25
package.json
@@ -3,28 +3,7 @@
|
||||
"type": "module",
|
||||
"version": "0.0.2",
|
||||
"scripts": {
|
||||
"dev": "concurrently 'vinxi dev' 'npm run dbstudio'",
|
||||
"build": "vinxi build",
|
||||
"start": "concurrently 'vinxi start' 'npm run dbstudio'",
|
||||
"dbstudio": "npx prisma studio --browser none",
|
||||
"dbdeploy": "npx prisma migrate deploy",
|
||||
"dbsync": "concurrently 'pnpm dlx prisma generate' 'pnpm dlx prisma migrate dev'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "6.13.0",
|
||||
"@solidjs/router": "^0.15.3",
|
||||
"@solidjs/start": "^1.1.0",
|
||||
"solid-js": "^1.9.5",
|
||||
"vinxi": "^0.5.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"concurrently": "^9.2.0",
|
||||
"json-schema": "^0.4.0",
|
||||
"prisma": "6.13.0",
|
||||
"tsx": "^4.20.3"
|
||||
"dev": "pnpm --parallel dev",
|
||||
"build": "pnpm run -F client build"
|
||||
}
|
||||
}
|
||||
|
||||
11
packages/client/index.html
Normal file
11
packages/client/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script type="module" src="/src/entry-client.tsx"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" />
|
||||
</body>
|
||||
</html>
|
||||
17
packages/client/package.json
Normal file
17
packages/client/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "client",
|
||||
"type": "module",
|
||||
"version": "0.0.2",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@solidjs/router": "^0.15.3",
|
||||
"solid-js": "^1.9.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "^7.0.6",
|
||||
"vite-plugin-solid": "^2.11.8"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
1
packages/client/public/views/back.svg
Symbolic link
1
packages/client/public/views/back.svg
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../assets/sources/Card_back_01.svg
|
||||
1
packages/client/public/views/cards
Symbolic link
1
packages/client/public/views/cards
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../assets/sources/Vector-Cards-Version-3.2/FACES (BORDERED)/STANDARD BORDERED/Single Cards (One Per FIle)
|
||||
@@ -1,8 +1,7 @@
|
||||
import "./app.css";
|
||||
import { Router } from "@solidjs/router";
|
||||
import { FileRoutes } from "@solidjs/start/router";
|
||||
import { Route, Router } from "@solidjs/router";
|
||||
import { Suspense } from "solid-js";
|
||||
import pkg from "~/../package.json";
|
||||
import pkg from "../package.json";
|
||||
|
||||
const Version = () => (
|
||||
<div class="full free clear">
|
||||
@@ -30,7 +29,7 @@ export default function App() {
|
||||
</>
|
||||
)}
|
||||
>
|
||||
<FileRoutes />
|
||||
<Route path="/" component={() => "tesingt"} />
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
4
packages/client/src/entry-client.tsx
Normal file
4
packages/client/src/entry-client.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
import App from "./app";
|
||||
import { render } from "solid-js/web";
|
||||
|
||||
render(App, document.getElementById("app")!);
|
||||
@@ -10,10 +10,11 @@
|
||||
"allowJs": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"types": ["vinxi/types/client"],
|
||||
"isolatedModules": true,
|
||||
"paths": {
|
||||
"~/*": ["./src/*"]
|
||||
"~/*": ["./src/*"],
|
||||
"$/*": ["./"],
|
||||
"@/*": ["./public/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
6
packages/client/vite.config.ts
Normal file
6
packages/client/vite.config.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { defineConfig } from "vite";
|
||||
import solidPlugin from "vite-plugin-solid";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [solidPlugin()],
|
||||
});
|
||||
2
packages/server/.gitignore
vendored
Normal file
2
packages/server/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# deps
|
||||
node_modules/
|
||||
11
packages/server/README.md
Normal file
11
packages/server/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
To install dependencies:
|
||||
```sh
|
||||
bun install
|
||||
```
|
||||
|
||||
To run:
|
||||
```sh
|
||||
bun run dev
|
||||
```
|
||||
|
||||
open http://localhost:3000
|
||||
18
packages/server/package.json
Normal file
18
packages/server/package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "server",
|
||||
"scripts": {
|
||||
"dev": "bun run --hot src/index.ts",
|
||||
"start": "bun run 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'"
|
||||
},
|
||||
"dependencies": {
|
||||
"hono": "^4.8.12",
|
||||
"@prisma/client": "6.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest",
|
||||
"prisma": "6.13.0"
|
||||
}
|
||||
}
|
||||
10
packages/server/src/index.ts
Normal file
10
packages/server/src/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Hono } from "hono";
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
app.get("/", (c) => {
|
||||
return c.text("Hello Hono!");
|
||||
});
|
||||
|
||||
console.log("server running");
|
||||
export default app;
|
||||
7
packages/server/tsconfig.json
Normal file
7
packages/server/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "hono/jsx"
|
||||
}
|
||||
}
|
||||
5488
pnpm-lock.yaml
generated
5488
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,5 @@
|
||||
onlyBuiltDependencies:
|
||||
- '@parcel/watcher'
|
||||
- esbuild
|
||||
- "@parcel/watcher"
|
||||
- esbuild
|
||||
packages:
|
||||
- "packages/*"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../assets/sources/Card_back_01.svg
|
||||
@@ -1 +0,0 @@
|
||||
../../assets/sources/Vector-Cards-Version-3.2/FACES (BORDERED)/STANDARD BORDERED/Single Cards (One Per FIle)/
|
||||
@@ -1,4 +0,0 @@
|
||||
// @refresh reload
|
||||
import { mount, StartClient } from "@solidjs/start/client";
|
||||
|
||||
mount(() => <StartClient />, document.getElementById("app")!);
|
||||
@@ -1,25 +0,0 @@
|
||||
// @refresh reload
|
||||
import { createHandler, StartServer } from "@solidjs/start/server";
|
||||
import { JSONFilePreset } from "lowdb/node";
|
||||
|
||||
export default createHandler(() => (
|
||||
<StartServer
|
||||
document={({ assets, children, scripts }) => (
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1"
|
||||
/>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
{assets}
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">{children}</div>
|
||||
{scripts}
|
||||
</body>
|
||||
</html>
|
||||
)}
|
||||
/>
|
||||
));
|
||||
Reference in New Issue
Block a user