EVS terminology browser application
See https://blog.risingstack.com/nodejs-at-scale-npm-best-practices/
- Run "npm outdated" from
frontendto see whether versions are out of date- Some fixing of packages was done, but this is really finicky.
- Sticking with Angular 16 for now.
This is how things run in production.
Run make clean build from the top level or ./gradlew clean build -x test" from the "web/" folder.
Launch the application with
java --add-opens=java.base/java.io=ALL-UNNAMED -jar build/libs/evsexplore-*.war
Then view the browser in http://localhost:4200/evsexplore/welcome
The built application has an application.yml file that drives the proxy endpoint for the redirected calls to the the API. Make sure this environment variable is set correctly for the deployment env.
Install npm, ideally the version specified in package.json. Then run npm install from frontend.
There are three ways to launch EVS-EXPLORE for development:
- If running a http://localhost:8082 EVSRESTAPI, use
npm startfromfrontend. - To use the NCI dev deployment of EVSRESTAPI, use
npm run start:devfromfrontend. This method requires being connected to the NIH/NCI VPN. - To simulate the production environment, perform the gradle build and then launch the .war file. For example:
cd web
java -Xmx4096M -jar build/libs/evsexplore-*.warThere are a few steps to making a tag to deploy to the testing environments (dev, stage, qa, etc):
- Build the frontend. Use the
make frontendcommand from the top level directory. - Build the Java app. Use the
make buildcommand from the top level, or inwebwith the command./gradlew clean build -x test. - Test that the application works.
- Push all changes to your branch.
- Make the tag. Use the
make tagcommand from the top level. This will require that you don't have any changes waiting to be pushed, otherwise it will fail.
This should work on Linux and the Mac.
npm install -g n
n lts
Windows, run PowerShell as Administrator:
To update NPM:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade
From the list provided, use the arrow keys to select version 10.8.3.
To update Node/ng, first install nvm:
nvm install 18.20.7
nvm use 18.20.7
npm uninstall -g @angular/cli
npm install -g @angular/cli@latest
The application has been specifically tested on the following browsers:
- Google Chrome
- Mozilla Firefox
- Microsoft Edge
- Opera
- Brave
- Download the official Prettier extension (version 10.1.0 or above).
- Make sure your ".prettierrc" file is in the root folder.
- Go to settings in the vscode menu.
- In the search bar, type "Prettier".
- Scroll down to "Prettier: Config Path"
- Type ".prettierrc" in the config path field.
- Now navigate to any typescript file.
- right click the code, and select "Format Document With...".
- If Prettier is not the default, select "Configure Default Formatter..." and select Prettier.
- Save your file, and and confirm that is prettier is working by checking the "prettier status" in the bottom right corner of the vsCode window.
- If it is red, observe the error and troubleshoot the problem by clicking the red icon.