https://github.com/petrbroz/forge-viewer-samples
Collection of Forge Viewer samples.
https://github.com/petrbroz/forge-viewer-samples
Last synced: 6 months ago
JSON representation
Collection of Forge Viewer samples.
- Host: GitHub
- URL: https://github.com/petrbroz/forge-viewer-samples
- Owner: petrbroz
- Created: 2020-10-06T14:54:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-08T10:03:53.000Z (over 3 years ago)
- Last Synced: 2025-03-27T21:24:37.586Z (7 months ago)
- Language: HTML
- Size: 15.6 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# forge-viewer-samples
Collection of [Autodesk Forge](https://forge.autodesk.com) viewer samples,
automatically deployed to Heroku application https://forge-viewer-samples.herokuapp.com.
Just navigate to any of the html files in the [public](./public) subfolder, for example:- https://forge-viewer-samples.herokuapp.com/aec-mapping-2d-to-3d.html
## Running locally
1. Get your Forge app client ID and client secret (see how to [create an app](https://forge.autodesk.com/en/docs/oauth/v2/tutorials/create-app))
2. Clone this repository, and navigate to the project's folder in your terminal
3. Install npm dependencies
- `yarn install`
4. Specify env. variables `FORGE_CLIENT_ID`, `FORGE_CLIENT_SECRET`, and `PORT`
- `export FORGE_CLIENT_ID=`
- `export FORGE_CLIENT_SECRET=`
- `export PORT=3000`
5. Run the app
- `yarn start`If you're using [Visual Studio Code](https://code.visualstudio.com), skip the steps 4 and 5,
and instead create a _.vscode/launch.json_ in the project's folder with the following JSON:```json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"/**"
],
"program": "${workspaceFolder}/server.js",
"env": {
"FORGE_CLIENT_ID": "",
"FORGE_CLIENT_SECRET": "",
"PORT": 3000
}
}
]
}
```Then you can run _and debug_ the application with `F5`, or by going to `Run` > `Start Debugging`.