console-core-portal-koa-server v2.0.18
Description
This is an lib for pccwglobal Team PO, to support the FE server. It will provider some base function and start a koa server.
How to use it?
we provider a npm command spa-server;
you can use it like this:
spa-server -p 8080 -n portal-cpq-p mean port, -n mean name which will be used in Consul.
spa-server
how it works?
after you run
spa-server -p 8080 -n portal-cpq, it will start a node server(we use koa) with port8080, the static file path is/distso you need the folder/distin you own project root path.it will connect to Consul
'http://consul-server', port8500, watch the config. when get notification from Consul, it will run commandnpm run build.
endpoints
/status GET
return the building status
start:'start building',
building:'building',
done:'build done',
error:'error',
startKill:'start kill',
killed:'killed',
working:'server on',/heartbeat GET
return the /dist/heartbeat.json
{
"name": "@console/console-core-portal-order",
"version": "0.0.0",
"relatedAt": "",
"description": "Sherpa Portal Order",
"status": "UP"
}/consul GET
return the consul config and status
repoName: consul.repoName,
firstBuild: consul.firstBuild,
buildStatus: global.buildStatus,
watchStatus: consul.watchStatus,/consul POST
it will run consul.watchConsul(), will try bind the watch
in consul.then return the consul config and status
repoName: consul.repoName,
firstBuild: consul.firstBuild,
buildStatus: global.buildStatus,
watchStatus: consul.watchStatus,Koa
Consul
Automate network configurations, discover services, and enable secure connectivity across any cloud or runtime.
TODO
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago