Files
FileHost/docs-site/en/guide/local-dev.md
T
O96u c9c34515dd
GitHub Release / release (push) Canceled after 0s
Publish Docker image / build (linux/amd64, ubuntu-latest, amd64) (push) Canceled after 0s
Publish Docker image / build (linux/arm64, ubuntu-24.04-arm, arm64) (push) Canceled after 0s
Publish Docker image / merge (push) Canceled after 0s
ci / ci (22, ubuntu-latest) (push) Canceled after 0s
release: v1.2.2 — 双域名配置与 Host 隔离修复
修复设置页误清空管理域、配置与生效 URL 混淆及第三 Host 绕过隔离;加固 Settings API 与中间件,并更新文档站。
2026-08-30 10:57:26 +08:00

1.5 KiB

Local development

Full-stack Nuxt 4 development at the repository root. Data defaults to ./data.

Requirements

  • Node.js 22
  • npm 11 (see packageManager in package.json)

Start

npm install
cp .env.example .env   # optional
npm run dev

Open http://localhost:3000/setup to create the admin account. Data directory defaults to ./data (DATA_DIR overrides).

Common commands

Command Description
npm run dev Dev server
npm run build Production build
npm run start Run .output
npm run lint ESLint
npm run typecheck Type check
npm test Unit tests
npm run reset-password Reset password (optional username)
npm run migrate Preview legacy dir migration (-- --apply to run)

Dev-only variables

Variable Description
DEV_BYPASS_ACCESS true bypasses login (skips /setup; rarely needed)
DATA_DIR Data directory, default ./data

Full list: Environment variables.

Dual-domain local test

Edit hosts and follow Dual-domain separation for local verification.

Documentation site

npm run docs:dev
npm run docs:build
npm run docs:preview

Sources live in docs-site/; screenshot sources are in docs/screenshots/ (including login.png), copied to docs-site/public/screenshots/ before build. Live docs: https://o96u.github.io/PicHost/