This project was scaffolded with degit.
Prior to running the app, you will need to add OIDC client configuration to the variables in the .env file:
# ---- Authorization Client Settings ----
IMJS_AUTH_CLIENT_CLIENT_ID=""
IMJS_AUTH_CLIENT_REDIRECT_URI=""
IMJS_AUTH_CLIENT_LOGOUT_URI=""
IMJS_AUTH_CLIENT_SCOPES=""
-
You can generate a test client to get started.
-
Viewer expects the
itwin-platformscope to be set. -
The application will use the path of the redirect URI to handle the redirection, it must simply match what is defined in your client.
-
When you are ready to build a production application, register here.
You should also add a valid iTwinId and iModelId for your user in the this file:
# ---- Test ids ----
IMJS_ITWIN_ID = ""
IMJS_IMODEL_ID = ""
-
For the IMJS_ITWIN_ID variable, you can use the id of one of your existing iTwins. You can obtain their ids via the iTwin REST APIs.
-
For the IMJS_IMODEL_ID variable, use the id of an iModel that belongs to the iTwin that you specified in the IMJS_ITWIN_ID variable. You can obtain iModel ids via the iModel REST APIs.
-
Alternatively, you can generate a test iModel to get started without an existing iModel.
-
If at any time you wish to change the iModel that you are viewing, you can change the values of the iTwinId or iModelId query parameters in the url (i.e. localhost:3000?iTwinId=myNewITwinId&iModelId=myNewIModelId)
In the project directory, you can run:
Installs all the dependencies listed in your package.json.
Runs the app in the development mode.
It automatically opens http://localhost:3000 in your default browser.
The page will reload if you make edits.\
Builds the app for production to the dist folder.
It bundles your code in production mode and applies optimizations for best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Once you have built the app using npm run build you may test it locally by running this command.
This will boot up a local static web server that serves the files from dist at http://localhost:3000.
Runs ESLint on all source files to check for code style issues and potential errors.