mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
17 lines
411 B
JavaScript
17 lines
411 B
JavaScript
'use strict';
|
|
|
|
const fetch = require('node-fetch');
|
|
const BbPromise = require('bluebird');
|
|
|
|
function eventGatewayRunning(eventGatewayRootUrl) {
|
|
const eventGatewayStatusEndpoint = `${eventGatewayRootUrl}/v1/status`;
|
|
|
|
return fetch(eventGatewayStatusEndpoint, {
|
|
method: 'GET',
|
|
timeout: 1000,
|
|
}).then(res => res.ok)
|
|
.catch(() => BbPromise.resolve(false));
|
|
}
|
|
|
|
module.exports = eventGatewayRunning;
|