"slc loopback" 不创建 "common" 目录
"slc loopback" doesn't create "common" directory
我找不到用户、acl 和此类 json 文件,因为该工具没有创建这些文件所属的 "common" 目录。
这是我用 slc --version:
得到的
├── strong-arc@1.8.4 (b7b568d)
├── strong-build@2.0.6 (d008a3e)
├── strong-deploy@3.1.2 (be6180a)
├── strong-mesh-models@8.1.0 (62e539b)
├── strong-pm@5.0.1 (b96f806)
├── strong-registry@1.1.5 (f46e58f)
├── strong-start@1.3.2 (1327018)
├─┬ strong-supervisor@3.3.1 (1e39220)
│ └── strong-agent@2.0.2 (4ea7ee9)
├── generator-loopback@1.13.0 (a884c0b)
├── node-inspector@0.7.4
└── nodefly-register@0.3.3
这是 "slc loopback" 生成的 package.json 文件:
{
"name": "asd",
"version": "1.0.0",
"main": "server/server.js",
"scripts": {
"pretest": "jshint ."
},
"dependencies": {
"compression": "^1.0.3",
"cors": "^2.5.2",
"loopback": "^2.22.0",
"loopback-boot": "^2.6.5",
"loopback-component-explorer": "^2.1.0",
"loopback-datasource-juggler": "^2.39.0",
"serve-favicon": "^2.0.1"
},
"devDependencies": {
"jshint": "^2.5.6"
},
"repository": {
"type": "",
"url": ""
},
"description": "asd"
}
一旦您开始创建自己的模型和 ACL,Loopback 将生成所需的 json
和 js
文件。碰巧它创建了 common
目录
运行 以下命令:
slc loopback:model
将允许您扩展 User
模型,然后您将能够通过以下方式添加适当的 ACL
权限:
slc loopback:acl
我找不到用户、acl 和此类 json 文件,因为该工具没有创建这些文件所属的 "common" 目录。
这是我用 slc --version:
得到的├── strong-arc@1.8.4 (b7b568d)
├── strong-build@2.0.6 (d008a3e)
├── strong-deploy@3.1.2 (be6180a)
├── strong-mesh-models@8.1.0 (62e539b)
├── strong-pm@5.0.1 (b96f806)
├── strong-registry@1.1.5 (f46e58f)
├── strong-start@1.3.2 (1327018)
├─┬ strong-supervisor@3.3.1 (1e39220)
│ └── strong-agent@2.0.2 (4ea7ee9)
├── generator-loopback@1.13.0 (a884c0b)
├── node-inspector@0.7.4
└── nodefly-register@0.3.3
这是 "slc loopback" 生成的 package.json 文件:
{
"name": "asd",
"version": "1.0.0",
"main": "server/server.js",
"scripts": {
"pretest": "jshint ."
},
"dependencies": {
"compression": "^1.0.3",
"cors": "^2.5.2",
"loopback": "^2.22.0",
"loopback-boot": "^2.6.5",
"loopback-component-explorer": "^2.1.0",
"loopback-datasource-juggler": "^2.39.0",
"serve-favicon": "^2.0.1"
},
"devDependencies": {
"jshint": "^2.5.6"
},
"repository": {
"type": "",
"url": ""
},
"description": "asd"
}
Loopback 将生成所需的 json
和 js
文件。碰巧它创建了 common
目录
运行 以下命令:
slc loopback:model
将允许您扩展 User
模型,然后您将能够通过以下方式添加适当的 ACL
权限:
slc loopback:acl