
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
用于演示的demo
POST /v1/tong-demo1/async-demo async,await使用demo GET /v1/tong-demo1/hello hello demo POST /v1/tong-demo1/updateShare 添加或修改分享信息
3.1. 安装
npm install tong-demo1 --save
3.2. 配置
清单3.1: /config/config.js
module.exports = {
getConfig:function(env){
let svr = require(`./${env}/server.json`);
let db = require(`./${env}/db.json`);
let log = require(`./${env}/log.json`);
let fileWhiteList = require(`./${env}/fileWhiteList.json`);
return{
"server":svr,
"customConfig":{
fileWhiteList:fileWhiteList
},
"plugins":{
"light-api-log":log,
"light-api-mysql":db.mysql,
}
}
}
}
清单3.2: /config/${env}/sever.json
{
"port":9000,
"documentation":true
}
清单3.3: /config/${env}/db.json
{
"mysql":{
"connectionLimit" : 20,
"host": "localhost:3306",
"user": "root",
"password" :"",
"database" :"test"
},
"mongoDB":{
"servers":["localhost:27017"],
"defaultDB":"portal",
"otherDB":["live","log"],
"fileDB":"service_system",
"fileColPrefix":"file",
"poolSize":10
},
"redis":{
"sentinels":["lcoalhsost:26379"],
"name": "mymaster",
"cache":true,
"mq":false,
"channels":["gho","kml","ghol"]
}
}
清单3.4: /config/${env}/log.json
{
"appenders": [
{ "type": "console"},
{ "type": "dateFile",
"filename": "/tmp/logs/tong-demo1-service",
"alwaysIncludePattern": true,
"pattern": "-yyyy-MM-dd.log"
}
],
"replaceConsole": false,
"level": "info"
}
清单3.5: /config/${env}/fileWhiteList.json
[
".png",
".jpg",
".gif",
".jpeg",
".plist",
".apk",
".ipa",
".zip",
".p12",
".mobileprovision",
".keystore"
]
3.插件使用
提供本模块的插件及插件的配置
FAQs
用于演示的demo
The npm package tong-demo1 receives a total of 13 weekly downloads. As such, tong-demo1 popularity was classified as not popular.
We found that tong-demo1 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.