2.4 KiB
Development in Windows
Memos is built with a curated tech stack. It is optimized for developer experience and is very easy to start working on the code:
- It has no external dependency.
- It requires zero config.
- 1 command to start backend and 1 command to start frontend, both with live reload support.
Tech Stack
| Frontend | Backend |
|---|---|
| React | Go |
| Tailwind CSS | SQLite |
| Vite | |
| pnpm |
Prerequisites
Steps
(Using PowerShell)
-
pull source code
git clone https://github.com/usememos/memos # or gh repo clone usememos/memos -
cd into the project root directory
cd memos -
start backend using air (with live reload)
air -c .\scripts\.air-windows.toml -
start frontend dev server
cd web; pnpm i; pnpm dev
Memos should now be running at http://localhost:3001 and changing either frontend or backend code would trigger live reload.
Building
Frontend must be built before backend. The built frontend must be placed in the backend ./server/frontend/dist directory. Otherwise, you will get a "No frontend embedded" error.
Frontend
Move-Item "./server/frontend/dist" "./server/frontend/dist.bak"
cd web; pnpm i --frozen-lockfile; pnpm build; cd ..;
Move-Item "./web/dist" "./server/" -Force
Backend
go build -o ./build/memos.exe ./bin/memos/main.go
❕ Notes
-
Start development servers easier by running the provided
start.ps1script. This will start both backend and frontend in detached PowerShell windows:.\scripts\start.ps1 -
Produce a local build easier using the provided
build.ps1script to build both frontend and backend:.\scripts\build.ps1This will produce a memos.exe file in the ./build directory.