Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite with SSL and not committed SNS #2981

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Vite with SSL and not committed SNS #2981

wants to merge 2 commits into from

Conversation

dskloetd
Copy link
Contributor

@dskloetd dskloetd commented Jul 26, 2023

Steps to run the NNS dapp frontend against mainnet:

  1. In /etc/hosts add a line 127.0.0.1 nns.ic0.app
  2. Flush DNS cache sudo killall -HUP mDNSResponder (this works on Mac, might be different on other OSes?)
  3. From the repo root, create a mainnet config: DFX_NETWORK=mainnet ./config.sh
  4. From the frontend directory, run npm ci
  5. From the frontend directory, start the dev server: npm run dev -- --port 443 --https --host nns.ic0.app (this may ask for permission to install a custom certificate; this is necessary)
  6. In your browser go to https://nns.ic0.app/ and sign in as usual.

Clean up when you're done

  1. Restore /etc/hosts
  2. Remove the custom root certificate $HOME/.vite-plugin-mkcert/mkcert -uninstall

Steps I took to create the PR

  1. Install npm i vite-plugin-mkcert@1.10.1 -D
  2. In vite.config.ts add import mkcert from 'vite-plugin-mkcert' and change plugins: [sveltekit()], to plugins: [sveltekit(), mkcert()], and below it add server: { https: true },
  3. Changes to allow a non-committed SNS to be visible

https://dfinity.slack.com/archives/C03H6QEPW5D/p1690358000036119?thread_ts=1690309853.741629&cid=C03H6QEPW5D

@dskloetd dskloetd changed the title Vite with SSL and Catalyze Vite with SSL and not committed SNS Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants