Commit Graph

6 Commits

Author SHA1 Message Date
tarlety ac31e51d67
Fix session flood issue after prometheus metrics are implemented.
Root cause:
- prometheus metrics '/metrics/codimd' exported by 3ca0341 are still in 'routes need sessions' section.
- prometheus scrapes metrics repeatedly.
- new session created every time while prometheus scrapes metrics '/metrics/codimd'.

Solution:
- move /metrics/codimd from lib/routes.js to lib/metrics.js.
- move /metrics/codimd from section 'routes need sessions' of app.js to 'routes without sessions'.

Signed-off-by: tarlety <tarlety@gmail.com>
2020-05-04 20:57:46 +08:00
tarlety 09eb8556db
Exporting metrics for node.js, express, router, and codimd realtime status.
1. **/metrics/router** : exporting node.js/express Prometheus metrics by
[prometheus-api-metrics](https://www.npmjs.com/package/prometheus-api-metrics)

2. **/metrics/codimd** : exporting codimd realtime status (/status) as
Prometheus metrics

Signed-off-by: tarlety <tarlety@gmail.com>
2020-05-01 22:17:22 +08:00
BoHong Li 82cade2b87
refactor: noteActions
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:03 +08:00
BoHong Li 7f9970449a
refactor: showPublishNote
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:03 +08:00
BoHong Li 66edff87c5
refactor: show note
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:03 +08:00
BoHong Li b4ec353fcd
refactor: remove web folder
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:02 +08:00