mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-26 15:33:03 +03:00
1.4 KiB
1.4 KiB
Building AFFiNE Web
Note
For developing & building desktop client app, please refer to building-desktop-client-app.md
Table of Contents
Prerequisites
We suggest develop our product under node.js LTS(Long-term support) version
Option 1: Manually install node.js
install Node LTS version
Up to now, the major node.js version is 18.x
Option 2: Use node version manager
install nvm
nvm install --lts
nvm use --lts
Setup Environment
# install dependencies
pnpm install
Start Development Server
pnpm dev
The playground page should work at http://localhost:8080/
For more details, see apps/web/README.md
Testing
Adding test cases is strongly encouraged when you contribute new features and bug fixes.
We use Playwright for E2E test, and vitest for unit test.
To test locally, please make sure browser binaries are already installed via npx playwright install
. Then there are multi commands to choose from:
# run tests in headless mode in another terminal window
pnpm test