1.0.0 • Published 1 year ago

egg-status v1.0.0

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

egg-status

egg application "Health Checker"

Install

npm i egg-status

Usage

Enable egg-status plugin on config/plugin.ts.

export default {
  status: {
    package: 'egg-status',
    enable: true,
  },
}

Use egg-scripts deploy your egg application.

Firstly, we need to import egg-scripts as dependencies:

npm i egg-scripts

Then add npm scripts to package.json, create egg.status file after start and remove it before stop:

{
  "scripts": {
    "start": "egg-scripts start --daemon && touch egg.status",
    "stop": "rm -f egg.status && sleep 15 && egg-scripts stop"
  }
}

Set "Health Check" on SLB, example on alicloud

image

How to Contribute

Please let us know how can we help. Do check out issues for bug reports or suggestions first.

To become a contributor, please follow our contributing guide.

License

MIT