mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 15:24:55 +00:00
15 lines
466 B
TypeScript
15 lines
466 B
TypeScript
import MonitorInfrastructure from './Jobs/MonitorInfrastructure';
|
|
import { argv } from 'yargs';
|
|
|
|
const secretKey: string | undefined = (argv as any)['secret-key'];
|
|
const oneuptimeUrl: 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, oneuptimeUrl);
|