Enhance Windows dev support (#13)
Makes local dev work on Windows: cross-env for the server dev port, pnpm --parallel to run server+web together (replacing the POSIX-only '&'), PowerShell setup docs, engines widened to Node >=20, and a Node 20 + 24 CI matrix. CI keeps a stable required 'Build & test' status via an aggregate gate job so the matrix rename doesn't drop the context the main ruleset requires. Co-authored-by: BadAtCaptchas <2359196+BadAtCaptchas@users.noreply.github.com> Co-authored-by: Jannis Braun <151788261+TheZwiss@users.noreply.github.com>
This commit is contained in:
co-authored by
Jannis Braun
parent
43cab41e60
commit
1e6c7c6042
@@ -465,10 +465,10 @@ briefly restarts the `backspace` container (clients reconnect automatically).
|
||||
|
||||
## Development
|
||||
|
||||
Requirements: **Node.js 20 (LTS)** and **pnpm 10**, both pinned (`.nvmrc` plus
|
||||
the `packageManager` field), so `nvm use` and Corepack select the right versions
|
||||
automatically. Newer Node majors are untested; the Docker image always builds on
|
||||
Node 20 regardless of your host.
|
||||
Requirements: **Node.js 20 or newer** and **pnpm 10**. The `.nvmrc` file keeps
|
||||
Node 20 as the default development and production baseline; CI additionally
|
||||
exercises Node 24, and newer majors generally work but are not part of the test
|
||||
matrix. The Docker image continues to build on Node 20 regardless of your host.
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
@@ -476,6 +476,21 @@ cp .env.example .env # set JWT_SECRET (openssl rand -hex 32)
|
||||
pnpm dev # API server on :3005, Vite dev server on :5173
|
||||
```
|
||||
|
||||
On Windows PowerShell, confirm Node 20 or newer and use the native copy command:
|
||||
|
||||
```powershell
|
||||
node --version
|
||||
pnpm install
|
||||
Copy-Item .env.example .env
|
||||
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
|
||||
```
|
||||
|
||||
Paste the generated value after `JWT_SECRET=` in `.env`, then start both
|
||||
development servers with `pnpm dev`. Use `node --version` to confirm the active
|
||||
version if pnpm reports an engine warning. This covers the server and web dev
|
||||
servers; building the Electron desktop app still expects a POSIX shell (macOS or
|
||||
Linux).
|
||||
|
||||
> **Server/web only?** `pnpm install` also builds the desktop app's native
|
||||
> keyboard-hook module (`uiohook-napi`), which needs a C++ toolchain
|
||||
> (`make`, `g++`, `python3`). If those are missing it now **warns and continues**,
|
||||
@@ -604,7 +619,7 @@ packages/
|
||||
|
||||
| Layer | Technology |
|
||||
|--------------|------------|
|
||||
| Server | Node.js 20 (LTS), Fastify 4, TypeScript (strict) |
|
||||
| Server | Node.js 20+, Fastify 4, TypeScript (strict) |
|
||||
| Database | SQLite (better-sqlite3) + Drizzle ORM |
|
||||
| Auth | JWT + bcrypt |
|
||||
| Frontend | React 18, Vite 6, Tailwind CSS 3, Zustand 5 |
|
||||
|
||||
Reference in New Issue
Block a user