You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ A sample demonstrating how to load a model into web application with the Autodes
8
8
9
9
##Dependencies
10
10
11
-
Install the project' dependencies using npm before running the app by running the following command
12
-
'''
11
+
Install Node.js on your machine and clone this repo. Download the project' dependencies using npm before running the app by running the following command
12
+
```
13
13
npm install
14
-
'''
15
-
on the node.js console. This will install
14
+
```
15
+
on the node.js console. This will install the following node.js modules in the project.
16
16
- express
17
17
- request
18
18
- serve-favicon
@@ -21,22 +21,24 @@ This sample does not includes the workflow of uploading models. It depends on ot
21
21
22
22
##Setup/Usage Instructions
23
23
24
-
You can work with production or staging environment of Autodesk View and Data.
24
+
You can work with production or staging Autodesk View and Data environments. By default, the project is setup with the production server.
25
25
26
-
To work with production, there are 2 options to setup and run this sample
26
+
With the production server, you got 2 options to setup and run this sample.
27
27
28
-
Option A: Use [upload tool](http://still-spire-1606.herokuapp.com) online service to upload model.
28
+
### Option A: Use [upload tool](http://still-spire-1606.herokuapp.com) online service to upload model.
29
29
30
-
* Install Node.js
31
-
* Run "npm install" command from the server directory to install the necessary packages which are mentioned in Dependencies.
32
30
* The [upload tool](http://still-spire-1606.herokuapp.com) provides some existing models. Choose any one of them.
33
-
Or upload one of your own models with [upload tool](http://still-spire-1606.herokuapp.com)
34
-
* The [upload tool](http://still-spire-1606.herokuapp.com) will generate the URN of the model
35
-
* Copy this URN in /www/views/index.js, around line #20, replace the value for "urnprod".
36
-
* In /www/views/index.js, around line #28, make sure the variable staging is false.
37
-
* In /www/views/index.js, around line #31, change value of tokenurl to the token service 'http://still-spire-1606.herokuapp.com/api/rawtoken'
38
-
* In /www/views/index.html, use viewer3D.min.js and style.css from production environment
39
-
* Run the server: "node server.js" from command line
31
+
Or upload one of your own models with [upload tool](http://still-spire-1606.herokuapp.com) <br />
32
+
The [upload tool](http://still-spire-1606.herokuapp.com) will generate a URN of the model that you need later.
33
+
* Copy this URN in /www/views/index.js at line #18
34
+
```
35
+
var urnprod = 'your_urn_here';
36
+
```
37
+
* In /www/views/index.js, at line #36, change value of tokenurl to the access token you can generate from 'http://still-spire-1606.herokuapp.com/api/rawtoken'
38
+
* Run the server from the Node.js console, by running the follwing command:
39
+
```
40
+
node server.js
41
+
```
40
42
* Connect to server locally using a WebGL-compatible browser: http://localhost:3000/node/basic
41
43
42
44
Option B: Use your own credentials and upload models on your account
0 commit comments