换用 npm/so.* 库

This commit is contained in:
陆柯 2021-01-25 08:52:30 +08:00
parent ebab1a3122
commit a3665cacdf
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
{
"name": "webserver",
"name": "so.webserver",
"version": "1.0.0",
"description": "Launch web server",
"main": "server.js",
@ -15,9 +15,9 @@
"morgan": "^1.9.0",
"multer": "^1.4.2",
"serve-favicon": "^2.5.0",
"sysconfig": "git+https://git.faronear.org/npm/sysconfig",
"vhost": "^3.0.2",
"webtoken": "git+https://git.faronear.org/npm/webtoken"
"so.sysconfig": "git+https://git.faronear.org/npm/so.sysconfig",
"so.webtoken": "git+https://git.faronear.org/npm/so.webtoken",
"vhost": "^3.0.2"
},
"devDependencies": {
"cross-env": "^7.0.2",

View File

@ -14,7 +14,7 @@ const Config = Object.assign(
],
*/
},
require('sysconfig')
require('so.sysconfig')
)
if (typeof Config.ssl === 'string') {
Config.ssl = eval(`(${Config.ssl})`)
@ -25,7 +25,7 @@ if (typeof Config.ssl === 'string') {
const express = require('express')
const server = express()
const webtoken = require('webtoken')
const webtoken = require('so.webtoken')
/*** 通用中间件 ***/
server.use(require('morgan')('development' === server.get('env') ? 'dev' : 'combined'))