https://github.com/maxdome/mxd-info
Provide info routes for debugging
https://github.com/maxdome/mxd-info
Last synced: 12 months ago
JSON representation
Provide info routes for debugging
- Host: GitHub
- URL: https://github.com/maxdome/mxd-info
- Owner: maxdome
- Created: 2016-06-15T11:33:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-31T10:27:48.000Z (over 8 years ago)
- Last Synced: 2025-05-16T05:09:47.283Z (about 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example
Use optionally the summarize function to add more information to the `/info/summary`
```
const info = require('mxd-info')(config, app);
const summarize = summary => {};
info(summarize);
```
# Config
List of JSON paths of the info (config and package) which will be disguised for the `/info/config`, `/info/package` and `/info/properties`. For `/info/properties` the paths from `/info/config` will also be used
## Environment Variables
If environment variables are set, the config object will be ignored!
* MXD_INFO: JSON encodet list of JSON paths
## 'config' Object
```
{
"info": []
}
```
# Routes
* `/info` and `/info/summary`: response the summary with the most important information
* `/info/config`: response the config
* `/info/package`: response the `package.json`
* `/info/properties`: response the `config/properties.json`
* `/info/version`: response the version with the revision