AFFiNE/packages/backend/server
Brooooooklyn c7ddd679fd
feat(server): use native tokenizer impl (#6960)
### Benchmark

`yarn workspace @affine/server-native bench`

```
┌─────────┬────────────┬─────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name  │ ops/sec │ Average Time (ns)  │ Margin   │ Samples │
├─────────┼────────────┼─────────┼────────────────────┼──────────┼─────────┤
│ 0       │ 'tiktoken' │ '5'     │ 176932518.76000002 │ '±4.71%' │ 100     │
│ 1       │ 'native'   │ '16'    │ 61041597.51000003  │ '±0.60%' │ 100     │
└─────────┴────────────┴─────────┴────────────────────┴──────────┴─────────┘
```
2024-05-16 07:55:10 +00:00
..
migrations feat: improve query performence (#6764) 2024-05-06 09:12:04 +00:00
scripts ci: set private key from env (#6239) 2024-03-21 10:09:26 +00:00
src feat(server): use native tokenizer impl (#6960) 2024-05-16 07:55:10 +00:00
tests feat: add retry support for copilot (#6947) 2024-05-15 11:02:37 +00:00
.env.example fix: improve self-host convenience (#5582) 2024-01-15 09:24:53 +00:00
.gitignore refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
LICENSE refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
package.json feat(server): use native tokenizer impl (#6960) 2024-05-16 07:55:10 +00:00
README.md refactor(server): rename @affine/storage to @affine/server-native (#6682) 2024-04-29 02:14:20 +00:00
schema.prisma feat: improve query performence (#6764) 2024-05-06 09:12:04 +00:00
tsconfig.json refactor(server): rename @affine/storage to @affine/server-native (#6682) 2024-04-29 02:14:20 +00:00
tsconfig.node.json refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00

Server

Get started

Install dependencies

yarn

Build Native binding

yarn workspace @affine/server-native build

Run server

yarn dev

now you can access the server GraphQL endpoint at http://localhost:3000/graphql