Haha-Yes/utils/checkHapi.js

10 lines
218 B
JavaScript
Raw Normal View History

2021-03-16 16:18:51 +01:00
const fetch = require('node-fetch');
const { Hapi } = require('../config.json');
module.exports = async function () {
if (Hapi) {
var res = await fetch(Hapi);
return res.status === 200;
} else
return false;
};