@alevnyacow/nzmt 0.9.2 → 0.9.3
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 +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,16 +24,19 @@ Suppose you have NextJS application with generated Prisma client.
|
|
|
24
24
|
npm install inversify zod reflect-metadata @alevnyacow/nzmt
|
|
25
25
|
```
|
|
26
26
|
2. Enable `Experimental decorators` and `Emit Decorator Metadata` options in your `tsconfig.json`.
|
|
27
|
+
|
|
27
28
|
3. Initialize NZMT. This will set up all required infrastructure and configuration for you:
|
|
28
29
|
```bash
|
|
29
30
|
npx nzmt init prismaClientPath:@/app/generated/prisma/client
|
|
30
31
|
```
|
|
32
|
+
|
|
31
33
|
4. Scaffold your first entity. Example for a `Product` with `title` and `price`:
|
|
32
34
|
```bash
|
|
33
35
|
# Field syntax: f:<name>-<type>[.<zod-validators>]
|
|
34
36
|
npx nzmt entity product f:title-string,price-int.positive
|
|
35
37
|
```
|
|
36
38
|
This will generate the entity, its Zod schema and related types.
|
|
39
|
+
|
|
37
40
|
5. Scaffold server boilerplate
|
|
38
41
|
```bash
|
|
39
42
|
# product store (with Prisma implementation, RAM implementation and DI)
|