Skip to content
Snippets Groups Projects
Milho001's avatar
Leonardo Christino authored
This restructures the worspace int a turborepo with a (for now) single shared library with all shared components within. It includes vite build, vitest, and storybooks. Huski and CI are configured to lint and test the code.

Solves #19 and #20
1b96d041
History

GraphPolaris Frontend

Preparing to Run Locally

Be sure that you have node.js and pnpm installed. Please use pnpm for building and running the scripts of package.json. 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

  1. sudo vim /etc/hosts open the hosts file with your prefered text editor as root
  2. Add a new row containing 127.0.0.1 local.graphpolaris.com, this will route traffic from local.graphpolaris.com to 127.0.0.1
  3. brew install mkcert install mkcert utility
  4. mkcert -install generate local CA (certificate authority)
  5. Move into the /certs folder at the project root using cd
  6. mkcert --key-file local-key.pem --cert-file local-cert.pem local.graphpolaris.com create certificates for local SSL

Windows

  1. Open the hosts file under C:\Windows\System32\drivers\etc using a text editor, as administrator
  2. Add a new row containing 127.0.0.1 local.graphpolaris.com, this will route traffic from local.graphpolaris.com to 127.0.0.1
  3. Install mkcert using any of the ways described here
  4. Open an elevated Powershell or CMD session
  5. Move into the /certs folder at the project root using cd
  6. mkcert --key-file local-key.pem --cert-file local-cert.pem local.graphpolaris.com 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 pnpm 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 pnpm nx run web-graphpolaris:storybook if nx is not installed globally.