@shun-js/user 0.2.2 → 0.3.0

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.
Files changed (2) hide show
  1. package/README.md +56 -0
  2. package/package.json +8 -8
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # @shun-js/user
2
+
3
+ shun.js服务:用户服务
4
+
5
+ ## 配置文件
6
+
7
+ 以`user.json`命名
8
+
9
+ ```json
10
+ {
11
+ "port": 8003,
12
+ "paths": ["/user/login", "/user/check"],
13
+ "encryptKey": "xx",
14
+ "db": {
15
+ "connectionLimit": 20,
16
+ "host": "127.0.0.1",
17
+ "port": 3306,
18
+ "database": "db_user",
19
+ "user": "root",
20
+ "password": "xx",
21
+ "timezone": "Asia/Shanghai",
22
+ "charset": "utf8mb4"
23
+ },
24
+ "redisOptions": {
25
+ "port": 6380,
26
+ "host": "127.0.0.1",
27
+ "password": "xx",
28
+ "db": 0
29
+ },
30
+ "feishu": {
31
+ "url": "http://127.0.0.1:8001/feishu/bot",
32
+ "feishuUrl": "https://open.feishu.cn/open-apis/bot/v2/hook/xx"
33
+ }
34
+ }
35
+ ```
36
+
37
+ ## 启动
38
+
39
+ ```shell
40
+ # 全局安装该服务
41
+ npm i -g @shun-js/user
42
+
43
+ # 安装shun-cli
44
+ npm i -g @shun-js/shun-cli
45
+
46
+ # 启动,在user.json所在目录下
47
+ shunjs start @shun-js/user
48
+ ```
49
+
50
+ ## 请求
51
+
52
+ ```shell
53
+ curl --location --request POST 'http://127.0.0.1:8003/user/login' \
54
+ --data-urlencode 'mobile=xx' \
55
+ --data-urlencode 'code=123456'
56
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shun-js/user",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "user",
5
5
  "keywords": [
6
6
  "shun.js",
@@ -21,17 +21,17 @@
21
21
  "app.js"
22
22
  ],
23
23
  "dependencies": {
24
- "@shun-js/shun-config": "^0.0.9",
25
- "@shun-js/shun-service": "^0.1.0",
26
- "qiao-encode": "^5.0.0",
24
+ "@shun-js/shun-config": "^0.3.0",
25
+ "@shun-js/shun-service": "^0.3.0",
26
+ "qiao-encode": "^5.0.1",
27
27
  "qiao-log": "^5.1.9",
28
- "qiao-mysql": "^5.1.9",
29
- "qiao-redis": "^5.7.8",
30
- "qiao-z": "^5.7.7"
28
+ "qiao-mysql": "^5.8.6",
29
+ "qiao-redis": "^5.8.9",
30
+ "qiao-z": "^5.8.9"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public",
34
34
  "registry": "https://registry.npmjs.org/"
35
35
  },
36
- "gitHead": "99ab9ca840190a2bf5b418c5910e5b7055711a37"
36
+ "gitHead": "b287c9ec1a61be2cbdf8c9c4bfed5a26b1d62b0d"
37
37
  }