mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 23:30:10 +00:00
status api
This commit is contained in:
parent
9d426f8c5c
commit
7eca08dcff
@ -3,12 +3,12 @@ import Express, {
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
} from '../Utils/Express';
|
||||
import LocalCache from '../Infrastructure/LocalCache';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
|
||||
router.get('/', (_req: ExpressRequest, res: ExpressResponse) => {
|
||||
res.send({ status: 'identity' });
|
||||
res.send({ app: LocalCache.getString("app", "name") });
|
||||
});
|
||||
|
||||
// General status
|
||||
|
@ -17,6 +17,7 @@ import Express, {
|
||||
import CommonAPI from '../API/Index';
|
||||
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import LocalCache from '../Infrastructure/LocalCache';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
@ -76,5 +77,6 @@ app.use(logRequest);
|
||||
export default (appName: string) => {
|
||||
Express.launchApplication(appName);
|
||||
CommonAPI(appName);
|
||||
LocalCache.setString("app", "name", appName);
|
||||
return app;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user