https://github.com/autodesk-forge/viewer-steampunked-morgan
Morgan 3 wheeler interactive viewer: Displays Morgan 3 Wheeler model using Forge Viewer
https://github.com/autodesk-forge/viewer-steampunked-morgan
Last synced: 16 days ago
JSON representation
Morgan 3 wheeler interactive viewer: Displays Morgan 3 Wheeler model using Forge Viewer
- Host: GitHub
- URL: https://github.com/autodesk-forge/viewer-steampunked-morgan
- Owner: Autodesk-Forge
- License: mit
- Created: 2014-07-16T19:44:54.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T00:28:38.000Z (over 2 years ago)
- Last Synced: 2025-04-12T08:53:58.004Z (16 days ago)
- Language: JavaScript
- Homepage: http://autode.sk/m3w
- Size: 3.06 MB
- Stars: 5
- Watchers: 28
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Steampunk Morgan 3 Wheeler Forge Viewer sample
[](https://nodejs.org/)
[](https://www.npmjs.com/)
[](http://developer-autodesk.github.io/)

[](http://opensource.org/licenses/MIT)## Description
Please refer to https://www.keanw.com/2014/07/my-first-autodesk-360-viewer-sample.html
for the backroud story fo this sample.Live demo at: https://autode.sk/m3w
## Dependencies
This sample is dependent on the server part on Node.js and couple of Node.js extensions
which would update/install automatically via 'npm':* Node.js
Node.js - built on Chrome's JavaScript runtime for easily building fast, scalable network applications.
You need at least version v5.11.1. You can get Node.js from [here](http://nodejs.org/)
Node.js modules:
```
"express": "^4.13.4",
"morgan": "^1.7.0",
"request": "^2.72.0"
```## Setup Instructions
The sample was created using Node.js and javascript.
There is 3 methods to deploy/configure this project:### 1. Deploy on Heroku
[](https://heroku.com/deploy)
Once the Heroku server is setup, go on your Heroku Dashboard, select this new server, next Settings, and press the
'Reveal Config Vars.' button.Create 3 variables like this:
a. PORT = 80
b. CONSUMERKEY = <your consumer key>
c. CONSUMERSECRET = <your consumer secret>
Next restart the server.
### 2. Deploy on your server using environment variables (preferred method)
1. Clone this repo on your server (or local machine),
2. Go in your project directory and execute
```
npm install
```
Define a CONSUMERKEY and CONSUMERSECRET system variables from the console or script which will launch the
server.
* Windows
```
set CONSUMERKEY=xxxset CONSUMERSECRET=xxx
```
* OSX/Linux
```
export CONSUMERKEY xxxexport CONSUMERSECRET xxx
```
or passing on the command line to the Node.js process
```
sudo [PORT=] CONSUMERKEY=xxx CONSUMERSECRET=xxx node start.js
```
Replace keys placeholder xxx with your own keys.3. You are done for the setup, launch the node server using the command '[sudo] node start.js'.
sudo is required only on OSX and Linux.
* Windows
```
[set PORT=]
node start.js
```
* OSX/Linux
```
sudo [PORT=] node server.js
```
Note: the port argument can be omitted and default to port 5000. If port 80 is already in use by another
application (like Skype, or IIS, or Apache, ...), you can use any other free port such as 8000, 3000, etc...
But in the next section you would need to specify the port to use, i.e. http://localhost[:port]/### 3. Deploy on your server modifying the source code (make sure the files never go public to not compromise your keys)
1. Clone this repo on your server (or local machine),
2. Go in your project directory and edit the api.js file.
Put your CONSUMERKEY and CONSUMERSECRET keys onto the placeholders line #19 and #20.3. You are done for the setup, launch the node server using the command '[sudo] node server.js'.
sudo is required only on OSX and Linux.
* Windows
```
[set PORT=]
node server.js
```
* OSX/Linux
```
sudo [PORT=] node server.js
```
Note: the port argument can be omitted and default to port 5000. If port 80 is already in use by another
application (like Skype, or IIS, or Apache, ...), you can use any other free port such as 8000, 3000, etc...
But in the next section you would need to specify the port to use, i.e. http://localhost[:port]/### Thumbnail

--------
## License
This sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details.
## Written by
Kean Walmsley (Autodesk)
http://through-the-interface.typepad.com/through_the_interface/