EVS terminology browser application
See https://blog.risingstack.com/nodejs-at-scale-npm-best-practices/
- Run "npm outdated" from
frontend
to 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.
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 start
fromfrontend
. - To use the NCI dev deployment of EVSRESTAPI, use
npm run start:dev
fromfrontend
. 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-*.war
There are a few steps to making a tag to deploy to the testing environments (dev, stage, qa, etc):
- Build the frontend. Use the
make frontend
command from the top level directory. - Build the Java app. Use the
make build
command from the top level, or inweb
with the command./gradlew clean build -x test
. - Test that the application works.
- Push all changes to your branch.
- Make the tag. Use the
make tag
command 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
To update Node/ng, first install nvm
:
# node version (google "windows install nvm" for how to install "nvm")
nvm install 18.16.0
nvm use 18.16.0
# ng version
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.