-
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.
BLAIS5-4274 increase unit test coverage in bam (#356)
* chore: fail_ci_if_error: true * refactor: Protected server API endpoint test passes successfully * feat: Add all tests to cover the code in /api/users POST endpoint * fix: Prevent disk I/O each time GET * request hits server * fix: Fix formatting: yarn eslint . --fix fix: Add typemoq as dependency * feat: Add all tests to cover the code in /api/users DELETE endpoint * feat: Add all tests to cover the code in /api/users GET endpoint * feat: Add all tests to cover the code in /api/roles GET endpoint * feat: Add all tests to cover the code in /api/change_password/:user GET endpoint * fix: Fix Linting with ESLINT: yarn eslint . --fix * fix: Load .env variables if current env is not PROD. * fix: Remove launch.json from source control as it should be dev local file. * feat: Add test for "external Blaise API changePassword endpoint rejects request with error message" * chore: No changes in yarn.lock file. * refactor: Removed redundant json map from client. We don't trust client side script, mapping happens on server side so only one json map file needed that is on the server side.
- Loading branch information
Showing
10 changed files
with
297 additions
and
85 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
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
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,20 @@ | ||
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"; | ||
import dotenv from "dotenv"; | ||
|
||
const port: string = process.env.PORT || "5002"; | ||
const logger = pino(); | ||
app.listen(port); | ||
|
||
if (process.env.NODE_ENV !== "production") { | ||
dotenv.config(); | ||
} | ||
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
Oops, something went wrong.