very-express 0.4.3 → 0.4.5
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 +50 -74
- package/dist/index.js +86598 -922
- package/dist/templates/root/package.json +0 -2
- package/docs/defineJsonSchema.md +42 -0
- package/docs/developmentNote.md +16 -0
- package/docs/roadMap/RoadMap.md +30 -0
- package/docs/roadMap/v0-5-0.md +20 -0
- package/docs/roadMap/v0-6-0.md +7 -0
- package/docs/roadMap/v0-7-0.md +4 -0
- package/package.json +3 -4
- package/dist/_services/mongoConn.ts +0 -38
- package/dist/generators/app/role.generator.d.ts +0 -7
- package/dist/templates/_services/mongoConn.ts +0 -38
package/README.md
CHANGED
|
@@ -1,76 +1,52 @@
|
|
|
1
1
|
# VeryExpress
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
all you need is define the
|
|
9
|
-
|
|
2
|
+
this is a generator to make [Express](https://github.com/expressjs/express) REST API app based on [Json Schema](https://github.com/json-schema-org) and [Open Api](https://github.com/OAI)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Why?
|
|
6
|
+
bored on writing CRUD API time after time ?
|
|
7
|
+
then this tool might save your time,
|
|
8
|
+
all you need is define the **Json Schema** files.
|
|
9
|
+
|
|
10
|
+
|
|
10
11
|
# Quick Start
|
|
11
|
-
1.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
3.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## Road Map
|
|
56
|
-
- [ ] dockernize
|
|
57
|
-
- [x] generate express app
|
|
58
|
-
- [x] gen. openapi based on json schema
|
|
59
|
-
- [x] gen. controllers based on openapi
|
|
60
|
-
- [x] CRUD + Search api
|
|
61
|
-
- [ ] database
|
|
62
|
-
- [x] mongodb
|
|
63
|
-
- [ ] sql
|
|
64
|
-
- [ ] db encrtption [PDPA](https://en.wikipedia.org/wiki/Personal_Data_Protection_Act_2012)
|
|
65
|
-
- [ ] oauth2
|
|
66
|
-
- [ ] google
|
|
67
|
-
- [ ] microsoft
|
|
68
|
-
- [ ] github
|
|
69
|
-
- [ ] Role Base Access Control
|
|
70
|
-
|
|
71
|
-
## Enhancement To Do
|
|
72
|
-
|
|
73
|
-
- Implement data encryption & hash (PDPA)
|
|
74
|
-
- at JsonSchmea fields, add attribute
|
|
75
|
-
`x-dataSecure: "method"` while accessing data, perform encryption based on method selected.
|
|
76
|
-
|
|
12
|
+
1. install package globally.
|
|
13
|
+
```npm i -g very-express```
|
|
14
|
+
|
|
15
|
+
3. use cli to initialize configuration file **vex.config.json** under your project root directory.
|
|
16
|
+
`vex -init`
|
|
17
|
+
|
|
18
|
+
2. create a empty directory name it as value of vex.config's "jsonSchemaDir", default **jsonSchema**.
|
|
19
|
+
`mkdir jsonSchema`.
|
|
20
|
+
|
|
21
|
+
4. generate the app with vex.config param.
|
|
22
|
+
`vex`
|
|
23
|
+
|
|
24
|
+
5. you should saw a express typescript app being generated (with src, package.json etc) .
|
|
25
|
+
```
|
|
26
|
+
├── jsonSchema/
|
|
27
|
+
│ └── ...
|
|
28
|
+
├── src/
|
|
29
|
+
│ └── ...
|
|
30
|
+
├── package.json
|
|
31
|
+
├── tsconfig.json
|
|
32
|
+
├── vex.config.json
|
|
33
|
+
└── .env
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
6. you could create your db collection/table now in directory **jsonSchema/** just created,
|
|
37
|
+
refer to [Define Json Schmea](./docs/defineJsonSchema.md).
|
|
38
|
+
|
|
39
|
+
7. start the generated express app.
|
|
40
|
+
```
|
|
41
|
+
npm i
|
|
42
|
+
npm build
|
|
43
|
+
npm run start
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Resource
|
|
48
|
+
- [Documents](./docs/)
|
|
49
|
+
- [Road Map](./docs/roadMap/)
|
|
50
|
+
- [ReleaseNote](./docs/releaseNote)
|
|
51
|
+
|
|
52
|
+
- [Discord](https://discord.gg/PZGMzDp7)
|