shieldvision-ui v1.0.0
ShieldVision UI - Version 6
This is the interface for SV6.
Scripts
build
Creates a built version of the application ready to be served.
npm run build
dev (start)
Starts the development server. The development server has real time typescript parsing and linting with hot-reloading.
npm run dev
-- or --
npm run start
Private NPM Registry
To download all of the dependencies you will need to authorize your machine to download our private packages. Either npm login
with your DataShield NPM credentials or set the private registry like our pipeline with npm set //registry.npmjs.org/:_authToken $(NPM_TOKEN)
where NPM_TOKEN
is a personal access token.
lint
Lints all files inside the src
directory with the extensions .js
, .jsx
, .ts
, or .tsx
npm run lint
test
Runs jest
to run all tests. See jest.config.js
for naming details.
npm run test
Webpack, Environment Variables, and you
When working with environment variables through webpack, it isn't possible to console log them in the browser. The browser gets it's own process seperate from the one Webpack is using to construct the output files. The best way to check for an environment variable is to put it inside a div and render it to the page.
In other words, think of it as Webpack search and replacing all your process.env
variables at the time of build.
In development, the .env only loads on first build. This means that if you change the .env, you will need to kill the server and restart it.
Environment Variables
Name | Type | Description |
---|---|---|
DEV_OVERRIDE | boolean | While process.env.NODE_ENV is development , this can be enabled to bypass in progress systems. Otherwise setting to false , removing, or having any other process.env.NODE_ENV will result in normal functionality. |
OE_URL | string | The URL for Orchestration Engine |
JIRA_URL | string | The URL for linking Jira tickets. (INCLUDE ENDING SLASH) |
LOGROCKET_PROJECT | 'shieldvision-development' or 'shieldvision-qa-5j9lq' or 'shieldvision-production' | The name of the project in LogRocket to record sessions to |
Production
We use docker and nginx for our production build. To run docker install docker for windows. Afterwards you should be able to run the following commands.
Build docker image
docker build -t shieldvision .
Run new image
docker run -it --rm 3000:80 shieldvision
The production version of the application will be available at http://localhost:3000/. NOTE: When testing production changes be sure to clear cache to see updates.