https://github.com/itwin/viewer-sample-typescript
iTwin Viewer sample code
https://github.com/itwin/viewer-sample-typescript
Last synced: 2 months ago
JSON representation
iTwin Viewer sample code
- Host: GitHub
- URL: https://github.com/itwin/viewer-sample-typescript
- Owner: iTwin
- License: mit
- Created: 2021-10-25T17:12:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-19T15:28:07.000Z (almost 3 years ago)
- Last Synced: 2025-01-01T04:48:12.616Z (4 months ago)
- Language: TypeScript
- Size: 417 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MD
Awesome Lists containing this project
README
# Typescript Viewer Sample
## Running the Sample
1. From a terminal at any directory within the repo, execute "rush install".
2. From a terminal at any directory within the repo, execute "rush build". This should only need to be done once to build both the app and the extension. This repo is currently not setup for a production build of the app, but the build script will ensure that extension is also compiled.
3. Make a copy of the config.json file in app/public and name it "config-local.json". Add values to the keys in your config.local.json file. At a minimum, all auth client information as well as an iTwinId and iModelId are required to run the application. If you do not already have an iTwin application client id, you can obtain one [here](https://developer.bentley.com/register/).- Your client should include the following:
- API Associations
- Visualization - enable the `imodelaccess:read` scope
- iModels - enable the `imodels:read` scope
- Reality Data - enable the `realitydate:read` scope
- Application type - SPA
- Redirect URIs - http://localhost:30004. From a terminal at the root of the "app" directory, execute "npm start". This will compile the application in watch mode and start an http server on port 3000.
5. Navigate to http://localhost:3000 in your browser