GraphPolaris Frontend
Preparing to Run Locally
Due to the way auth works (using a sameSite cookie), the procedure for running locally is a little different than usual. These steps will only have to be done, after that everything should 'just' work.
MacOS / Linux
-
sudo vim /etc/hosts
open the hosts file with your prefered text editor as root - Add a new row containing
127.0.0.1 local.datastrophe.science.uu.nl
, this will route traffic fromlocal.datastrophe.science.uu.nl
to127.0.0.1
-
brew install mkcert
install mkcert utility -
mkcert -install
generate local CA (certificate authority) - Move into the /certs folder at the project root using
cd
-
mkcert --key-file local-key.pem --cert-file local-cert.pem local.datastrophe.science.uu.nl
create certificates for local SSL
Windows
- Open the
hosts
file underC:\Windows\System32\drivers\etc
using a text editor, as administrator - Add a new row containing
127.0.0.1 local.datastrophe.science.uu.nl
, this will route traffic fromlocal.datastrophe.science.uu.nl
to127.0.0.1
- Install mkcert using any of the ways described here
- Open an elevated Powershell or CMD session
- Move into the /certs folder at the project root using
cd
-
mkcert --key-file local-key.pem --cert-file local-cert.pem local.datastrophe.science.uu.nl
create certificates for local SSL
No idea if the Windows steps work
Running Locally
To run the application using SSL (with these keys) simply run nx run web-graphpolaris:dev
, or yarn nx run web-graphpolaris:dev
if nx
is not installed globally. This should open a window to https://local.datastrophe.science.uu.nl:4200/
automatically.
Running Storybook.js
To run the dev storybook (implementing visualizations) simply run nx run web-graphpolaris:storybook
, or yarn nx run web-graphpolaris:storybook
if nx
is not installed globally.