File tree Expand file tree Collapse file tree 3 files changed +47
-1
lines changed
templates/monorepo/packages Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " create-effect-app " : minor
3+ ---
4+
5+ feat(template/monorepo/server): add dev and README instructions
Original file line number Diff line number Diff line change 1414 "directory" : " dist"
1515 },
1616 "scripts" : {
17+ "dev" : " tsx --watch src/server.ts" ,
1718 "codegen" : " build-utils prepare-v2" ,
1819 "build" : " pnpm build-esm && pnpm build-annotate && pnpm build-cjs && build-utils pack-v2" ,
1920 "build-esm" : " tsc -b tsconfig.build.json" ,
Original file line number Diff line number Diff line change 1- # Effect Monorepo Template - Server Package
1+ # Effect Monorepo Template - Server Package
2+
3+ Run the ` dev ` script in ` @template/server ` package to start the server
4+
5+ The server will start on ` http://localhost:3000 ` by default.
6+
7+ ## TODOs API Endpoints
8+
9+ The server provides few endpoints
10+
11+ ### Create a new TODO
12+
13+ ``` sh
14+ curl -X POST http://localhost:3000/todos \
15+ -H " Content-Type: application/json" \
16+ -d ' {"text": "my first effect todo"}'
17+ ```
18+
19+ ### List all TODOs
20+
21+ ``` sh
22+ curl -X GET http://localhost:3000/todos
23+ ```
24+
25+ ### Get a specific TODO by ID
26+
27+ ``` sh
28+ curl -X GET http://localhost:3000/todos/0
29+ ```
30+
31+ ### Mark TODO completed
32+
33+ ``` sh
34+ curl -X PATCH http://localhost:3000/todos/0
35+ ```
36+
37+ ### Delete a specific TODO by ID
38+
39+ ``` sh
40+ curl -X DELETE http://localhost:3000/todos/0
41+ ```
You can’t perform that action at this time.
0 commit comments