mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Update OneUptime URL and secret key
This commit is contained in:
@@ -10,13 +10,13 @@ const usage: string =
|
||||
const argv: {
|
||||
[x: string]: unknown;
|
||||
k: string;
|
||||
h: string | undefined;
|
||||
u: string | undefined;
|
||||
_: (string | number)[];
|
||||
$0: string;
|
||||
} | Promise<{
|
||||
[x: string]: unknown;
|
||||
k: string;
|
||||
h: string | undefined;
|
||||
u: string | undefined;
|
||||
_: (string | number)[];
|
||||
$0: string;
|
||||
}> = yargs
|
||||
@@ -28,8 +28,8 @@ const argv: {
|
||||
type: 'string',
|
||||
demandOption: true,
|
||||
})
|
||||
.option('h', {
|
||||
alias: 'oneuptime-host',
|
||||
.option('u', {
|
||||
alias: 'oneuptime-url',
|
||||
describe: 'OneUptime Host. By default this is https://oneuptime.com',
|
||||
type: 'string',
|
||||
demandOption: false,
|
||||
@@ -37,7 +37,7 @@ const argv: {
|
||||
.help(true).argv;
|
||||
|
||||
const secretKey: string | undefined = (argv as any)['secret-key'];
|
||||
const oneuptimeHost: string = (argv as any)['oneuptime-host'] || 'https://oneuptime.com'
|
||||
const oneuptimeUrl: string = (argv as any)['oneuptime-url'] || 'https://oneuptime.com'
|
||||
|
||||
if (!secretKey) {
|
||||
throw new Error(
|
||||
@@ -45,4 +45,4 @@ if (!secretKey) {
|
||||
);
|
||||
}
|
||||
|
||||
MonitorInfrastructure.initJob(secretKey, oneuptimeHost);
|
||||
MonitorInfrastructure.initJob(secretKey, oneuptimeUrl);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"start": "node --require ts-node/register Index.ts",
|
||||
"start": "node --require ts-node/register Index.ts --secret-key=412d0d60-e3c8-11ee-b6b0-472ce913f697 --oneuptime-url=http://localhost",
|
||||
"build": "esbuild Index.ts --bundle --platform=node --outfile=./build/Index.js --loader:.node=file",
|
||||
"compile": "tsc",
|
||||
"clear-modules": "rm -rf node_modules && rm package-lock.json && npm install",
|
||||
|
||||
@@ -26,6 +26,9 @@ router.get(
|
||||
next: NextFunction
|
||||
): Promise<void> => {
|
||||
try {
|
||||
|
||||
debugger;
|
||||
|
||||
const monitorSecretKeyAsString: string | undefined =
|
||||
req.params['secretkey'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user