fix(gp): weird issue with db username and password
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m41s
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m41s
This commit is contained in:
@@ -1,16 +1,14 @@
|
|||||||
import type sql from "mssql";
|
import type sql from "mssql";
|
||||||
|
|
||||||
const username = process.env.GP_USER ?? "gpviewer";
|
const username = "gpviewer";
|
||||||
const password = process.env.GP_PASSWORD ?? "gp$$ViewOnly!";
|
const password = "gp$$ViewOnly!";
|
||||||
|
|
||||||
const gpServer = process.env.GP_SERVER ?? "USMCD1VMS011";
|
|
||||||
|
|
||||||
const port = process.env.SQL_PORT
|
const port = process.env.SQL_PORT
|
||||||
? Number.parseInt(process.env.SQL_PORT, 10)
|
? Number.parseInt(process.env.SQL_PORT, 10)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
export const gpSqlConfig: sql.config = {
|
export const gpSqlConfig: sql.config = {
|
||||||
server: gpServer,
|
server: `${process.env.GP_SERVER ?? "USMCD1VMS011"}`,
|
||||||
port: port,
|
port: port,
|
||||||
database: `ALPLA`,
|
database: `ALPLA`,
|
||||||
user: username,
|
user: username,
|
||||||
|
|||||||
@@ -53,13 +53,14 @@ export const connectGPSql = async () => {
|
|||||||
notify: false,
|
notify: false,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
reconnectToSql;
|
reconnectToSql;
|
||||||
return returnFunc({
|
return returnFunc({
|
||||||
success: false,
|
success: false,
|
||||||
level: "error",
|
level: "error",
|
||||||
module: "system",
|
module: "system",
|
||||||
subModule: "db",
|
subModule: "db",
|
||||||
message: "Failed to connect to the prod sql server.",
|
message: "Failed to connect to the gp sql server.",
|
||||||
data: [error],
|
data: [error],
|
||||||
notify: false,
|
notify: false,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user