Files
NodeBB/src/controllers/ping.js

14 lines
310 B
JavaScript
Raw Normal View History

'use strict';
const nconf = require('nconf');
const db = require('../database');
2019-08-12 21:56:09 -04:00
module.exports.ping = async function (req, res, next) {
try {
await db.getObject('config');
2021-02-03 23:59:08 -07:00
res.status(200).send(req.path === `${nconf.get('relative_path')}/sping` ? 'healthy' : '200');
2019-08-12 21:56:09 -04:00
} catch (err) {
next(err);
}
};