-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Protected server API endpoint test passes successfully
- Loading branch information
Showing
4 changed files
with
147 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest Run All", | ||
"program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"args":["--runInBand"], | ||
"console" : "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest Run 1", | ||
"program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"args":["--runInBand", "${relativeFile}"], | ||
"console" : "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
import app from "./server"; | ||
import GetNodeServer from "./server"; | ||
import pino from "pino"; | ||
import { loadConfigFromEnv } from "./Config"; | ||
import BlaiseApiClient from "blaise-api-node-client"; | ||
import { Auth } from "blaise-login-react/blaise-login-react-server"; | ||
|
||
const port: string = process.env.PORT || "5002"; | ||
const logger = pino(); | ||
app.listen(port); | ||
|
||
const config = loadConfigFromEnv(); | ||
const blaiseApiClient = new BlaiseApiClient(config.BlaiseApiUrl); | ||
const auth = new Auth(config); | ||
const server = GetNodeServer(config, blaiseApiClient, auth); | ||
server.listen(port); | ||
|
||
logger.info("App is listening on port " + port); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters