Comments (1)
seems need to write custom adapter
// custom adapter so won't errror on windows
const adapter = async (service: any, server: any, route: any) => {
const url: string = path.join('/status', route.path).replace(/\\/g, '/');
// 1. Expose given route in the `http` server application, here an example for the `Express.js`:
// eslint-disable-next-line implicit-arrow-linebreak
return server.get(url, async (req: any, res: any, next: any) => {
try {
// 2. Combine the `Express.js` route parameters:
const params = { ...req.params, ...req.query, ...req.headers };
// 3. Call given `route.handler` passing combined parameters and given service descriptor:
const result = await route.handler(params, service);
// 4. Decorate the `Express.js` response:
res.status(result.status);
res.set('Content-Type', result.contentType);
res.set(result.headers);
// 5. Return the response body according to given `contentType`:
switch (result.contentType) {
case 'application/json':
res.json(result.body);
break;
default:
res.send(result.body);
}
} catch (err) {
// 6. Deal with the Error according to `Express.js` framework rules.
next(err);
}
});
};
the err seems on url path
const url: string = path.join('/status', route.path);
from node-healthchecks-api.
Related Issues (20)
- An in-range update of nock is breaking the build 🚨 HOT 5
- An in-range update of eslint-plugin-jest is breaking the build 🚨 HOT 4
- await healthCheck(app) doesn't wait HOT 6
- An in-range update of eslint-plugin-jest is breaking the build 🚨 HOT 4
- An in-range update of eslint-plugin-jsdoc is breaking the build 🚨 HOT 6
- An in-range update of eslint is breaking the build 🚨 HOT 1
- An in-range update of http-status is breaking the build 🚨 HOT 4
- An in-range update of eslint-plugin-jsdoc is breaking the build 🚨 HOT 6
- An in-range update of eslint-plugin-jest is breaking the build 🚨 HOT 31
- Is there is any way to use sslCa in mongo health check?? HOT 2
- An in-range update of mongodb is breaking the build 🚨 HOT 9
- An in-range update of superagent is breaking the build 🚨 HOT 3
- An in-range update of semantic-release is breaking the build 🚨 HOT 1
- An in-range update of mime-types is breaking the build 🚨 HOT 2
- An in-range update of elasticsearch is breaking the build 🚨 HOT 3
- Add mssql check type
- Add framework adapter to koa
- https check
- An in-range update of eslint-plugin-jest is breaking the build 🚨 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-healthchecks-api.