@grest-ts/create-starter 0.0.14 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -3,4 +3,79 @@
|
|
|
3
3
|
> [Documentation](https://github.com/grest-ts/grest-ts#readme) | [All packages](https://github.com/grest-ts/grest-ts#package-reference)
|
|
4
4
|
<!-- GREST-TS-BANNER-END -->
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# @grest-ts/create-starter
|
|
7
|
+
|
|
8
|
+
Scaffold a new grest-ts project with a single command.
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx @grest-ts/create-starter my-app
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or run without arguments to be prompted for a project name:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @grest-ts/create-starter
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then follow the printed instructions:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cd my-app
|
|
26
|
+
npm install
|
|
27
|
+
cd server && npm run dev # start the server
|
|
28
|
+
cd client && npm run dev # start the client (in another terminal)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The server starts on `http://localhost:9000` and the client on `http://localhost:3000`.
|
|
32
|
+
|
|
33
|
+
## What You Get
|
|
34
|
+
|
|
35
|
+
The generated project is a npm workspaces monorepo with three packages:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
my-app/
|
|
39
|
+
├── api/ # Shared contracts and types
|
|
40
|
+
│ └── src/api/
|
|
41
|
+
│ └── HelloApi.ts
|
|
42
|
+
├── server/ # Backend HTTP server
|
|
43
|
+
│ ├── src/
|
|
44
|
+
│ │ ├── AppRuntime.ts
|
|
45
|
+
│ │ └── services/
|
|
46
|
+
│ │ └── HelloApiImpl.ts
|
|
47
|
+
│ └── test/
|
|
48
|
+
│ ├── integration/
|
|
49
|
+
│ │ └── hello.test.ts
|
|
50
|
+
│ └── TestContext.ts
|
|
51
|
+
├── client/ # Frontend web UI (Vite)
|
|
52
|
+
│ ├── index.html
|
|
53
|
+
│ └── src/
|
|
54
|
+
│ └── main.ts
|
|
55
|
+
└── package.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### `api/` — Shared Contracts
|
|
59
|
+
|
|
60
|
+
Defines typed API contracts using `@grest-ts/schema` and `@grest-ts/http`. Contracts are shared between the server and client so both sides stay in sync.
|
|
61
|
+
|
|
62
|
+
### `server/` — Backend
|
|
63
|
+
|
|
64
|
+
A grest-ts runtime that serves the API over HTTP. Comes with:
|
|
65
|
+
|
|
66
|
+
- A working `HelloApi` implementation
|
|
67
|
+
- Integration tests using Vitest and `@grest-ts/testkit`
|
|
68
|
+
- esbuild bundling for production
|
|
69
|
+
- Watch mode for development (`npm run dev`)
|
|
70
|
+
|
|
71
|
+
### `client/` — Frontend
|
|
72
|
+
|
|
73
|
+
A Vite-powered web UI with a typed API client generated from the shared contract. The dev server proxies `/api/*` requests to the backend.
|
|
74
|
+
|
|
75
|
+
## Requirements
|
|
76
|
+
|
|
77
|
+
- Node.js >= 25
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grest-ts/create-starter",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Scaffold a new grest-ts project",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"url": "https://github.com/grest-ts/grest-ts.git",
|
|
18
18
|
"directory": "packages-tooling/create-starter"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://
|
|
20
|
+
"homepage": "https://grest-ts.com/packages/create-starter",
|
|
21
21
|
"bugs": {
|
|
22
22
|
"url": "https://github.com/grest-ts/grest-ts/issues"
|
|
23
23
|
},
|
|
@@ -36,8 +36,5 @@
|
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=25"
|
|
38
38
|
},
|
|
39
|
-
"bin": "./index.mjs"
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@grest-ts/x-packager": "0.0.14"
|
|
42
|
-
}
|
|
39
|
+
"bin": "./index.mjs"
|
|
43
40
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|