chore: update pnpm scripts (#2350)

* chore: update pnpm scripts

* chore: update development guide
This commit is contained in:
boojack
2023-10-07 12:06:18 -05:00
committed by GitHub
parent b938c8d7b6
commit dfaf2ee29c
5 changed files with 90 additions and 31 deletions

View File

@@ -10,34 +10,33 @@ Memos is built with a curated tech stack. It is optimized for developer experien
- [Go](https://golang.org/doc/install)
- [Air](https://github.com/cosmtrek/air#installation) for backend live reload
- [Buf](https://buf.build/docs/installation)
- [Node.js](https://nodejs.org/)
- [pnpm](https://pnpm.io/installation)
## Steps
1. pull source code
1. Pull the source code
```bash
git clone https://github.com/usememos/memos
```
2. start backend using air(with live reload)
2. Start backend server with `air`(with live reload)
```bash
air -c scripts/.air.toml
```
3. generate TypeScript code from protobuf with `buf`
3. Install frontend dependencies and generate TypeScript code from protobuf
```
cd proto && buf generate
cd web && pnpm i && pnpm type-gen
```
4. start frontend dev server
4. Start the dev server of frontend
```bash
cd web && pnpm i && pnpm dev
cd web && pnpm dev
```
Memos should now be running at [http://localhost:3001](http://localhost:3001) and change either frontend or backend code would trigger live reload.