mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
14 lines
467 B
TypeScript
14 lines
467 B
TypeScript
import MonitorInfrastructure from "./Jobs/MonitorInfrastructure";
|
|
import { argv } from 'yargs';
|
|
|
|
const secretKey: string | undefined = (argv as any)['secret-key'];
|
|
const oneuptimeHost: string =
|
|
(argv as any)['oneuptime-url'] || 'https://oneuptime.com';
|
|
|
|
if (!secretKey) {
|
|
throw new Error(
|
|
'No secret-key argument found. You can find secret key for this monitor on OneUptime Dashboard'
|
|
);
|
|
}
|
|
|
|
MonitorInfrastructure.initJob(secretKey, oneuptimeHost); |