create-sip 0.12.0 → 0.12.2
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/create-sip.js +2 -2
- package/expressapi/app/models/user.js +1 -1
- package/expressapi/docs/user_doc.md +9 -2
- package/manager.js +1 -2
- package/package.json +1 -1
package/create-sip.js
CHANGED
|
@@ -55,7 +55,7 @@ const questions = [
|
|
|
55
55
|
value: 'webesbuildts'
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
title: '
|
|
58
|
+
title: 'hai mock API',
|
|
59
59
|
description: 'API server with hai-server 0.0.4',
|
|
60
60
|
value: 'mockapi'
|
|
61
61
|
},
|
|
@@ -106,7 +106,7 @@ const questions = [
|
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
if(res.type === 'mockapi') {
|
|
109
|
-
console.log('Create a new
|
|
109
|
+
console.log('Create a new hai mock API server...');
|
|
110
110
|
genMockApi(res.name);
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Install dependencies
|
|
4
4
|
|
|
5
5
|
```cmd
|
|
6
|
-
|
|
6
|
+
npm install
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
## Copy config file
|
|
@@ -13,7 +13,7 @@ Copy **config/default.json.example** to **config/default.json** file.
|
|
|
13
13
|
## App key generation
|
|
14
14
|
|
|
15
15
|
```cmd
|
|
16
|
-
node
|
|
16
|
+
node op key:generate
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Database setup
|
|
@@ -55,3 +55,10 @@ You receive the bearear token with accessToken key.
|
|
|
55
55
|
## The users endpoint
|
|
56
56
|
|
|
57
57
|
Send the bearer token.
|
|
58
|
+
|
|
59
|
+
## Model and controller generation
|
|
60
|
+
|
|
61
|
+
```cmd
|
|
62
|
+
node op create model thing
|
|
63
|
+
node op create controller thing
|
|
64
|
+
```
|
package/manager.js
CHANGED
|
@@ -68,8 +68,7 @@ const genExpressApi = (target) => {
|
|
|
68
68
|
console.log('Run next commands:');
|
|
69
69
|
console.log(` cd ${target}`);
|
|
70
70
|
console.log(' npm install');
|
|
71
|
-
console.log(' node
|
|
72
|
-
console.log(' node tools/genkey.js');
|
|
71
|
+
console.log(' node op key:generate');
|
|
73
72
|
console.log(' npm run dev');
|
|
74
73
|
}
|
|
75
74
|
|