简介 Konga 是 Kong 的一个开源的管理后台。 官方网站:https://GitHub.com/pantsel/konga 安装 环境要求 确保已安装 npm 、node.js、bower。 下载 Konga 源码 git clo
Konga 是 Kong 的一个开源的管理后台。
官方网站:https://GitHub.com/pantsel/konga
确保已安装 npm 、node.js、bower。
git clone Https://github.com/pantsel/konga.git
npm run postinstall && npm i
cp .env.example .env
.env 文件内容参考:
PORT=1337
node_ENV=production
KONGA_HOOK_TIMEOUT=120000
DB_ADAPTER=Mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=konga
DB_DATABASE=konga
DB_PASSWord=konga
KONGA_LOG_LEVEL=warn
TOKEN_SECRET=some_secret_token
node ./bin/konga.js prepare --adapter mysql --uri mysql://localhost:5432/konga
数据库中会生成 Konga 的相关表:
npm run production
输出:
> kongadmin@0.14.9 production /www/wwwroot/konga
> node --harmony app.js --prod
(node:4108059) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:4108059) [DEP0095] DeprecationWarning: timers.enroll() is deprecated. Please use setTimeout instead.
(node:4108059) [DEP0126] DeprecationWarning: timers.active() is deprecated. Please use timeout.refresh() instead.
(node:4108059) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.
在生产环境中,执行:
pm2 start app.js --name konga
输出:
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 1 │ app │ default │ 0.14.9 │ fork │ 4126729 │ 76s │ 0 │ online │ 0% │ 94.1mb │ www │ disabled │
└─────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
--结束END--
本文标题: Kong 的管理后台 Konga
本文链接: https://www.lsjlt.com/news/99262.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0