-
Notifications
You must be signed in to change notification settings - Fork 222
Update web & desktop viewer learning tutorial to use degit, and new iTwin Vite template #8352
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
Conversation
pankhur94
commented
Jul 22, 2025
- Following Moving web-viewer-template from cra to vite viewer#379 & Moving desktop-viewer-template from cra to vite viewer#383 updating learning docs.
Co-authored-by: Ben Polinsky <[email protected]>
## Setup | ||
|
||
- [Install necessary prerequisites](./development-prerequisites.md). | ||
- From a terminal, `npx create-react-app your-app-name --template @itwin/desktop-viewer --scripts-version @bentley/react-scripts` | ||
- From a terminal, `npx degit iTwin/viewer/packages/templates/desktop#master your-app-name` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need to specify the master branch? shouldnt that just be the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right, degit clones the default branch anyway if none is specified. I just included it for clarity.
@@ -15,8 +17,8 @@ | |||
5. Give your application a Name | |||
6. Select **Native** as the Application Type | |||
7. Select the `itwin-platform` scope | |||
8. Set the **Redirect URL** to `http://localhost:3000/signin-callback` | |||
9. Set the **Post logout redirect URIs** to `http://localhost:3000` | |||
8. Set the **Redirect URL** to `http://localhost:3001/signin-callback` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we need to change the port? this port should match what the default port is used in the apim portal upon creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We changed this because in desktop(electron), we cannot have the same port for running the app and redirect/signin uri. I believe we do get an option to change the redirect, sigining url when creating our apps.