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
+41-25Lines changed: 41 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -39,39 +39,55 @@ With the production server, you got 2 options to setup and run this sample.
39
39
```
40
40
* Connect to server locally using a WebGL-compatible browser: [http://localhost:3000/node/basic](http://localhost:3000/node/basic)
41
41
42
-
Option B: Use your own credentials and upload models on your account
42
+
### Option B: Use your own credentials and upload models on your account
43
43
44
-
* Apply your own credentials from http://developer.autodesk.com
45
-
* Install Node.js
46
-
* Run "npm install" command from the server directory to install the necessary packages which are mentioned in Dependencies.
47
-
* Replace the place holder with your own credentials in credentials.js
44
+
* Apply your own credentials from [http://developer.autodesk.com](http://developer.autodesk.com)
45
+
* Replace the place holder with your own keys in credentials.js, line #23 and #25 <br />
46
+
```
47
+
credentials.ClientId = '<replace with clientId>';
48
+
credentials.ClientSecret = '<replace with clientSecret>';
49
+
```
48
50
* Upload one of your model in your account and get its URN using other workflow sample,for example, [this workflow sample in .net winform application](https://github.com/Developer-Autodesk/workflow-dotnet-winform-view.and.data.api/) if you are using windows or [this workflow sample in Mac OS Swift](https://github.com/Developer-Autodesk/workflow-macos-swift-view.and.data.api) if you are using Mac.
49
-
* Get your model urn from the workflow sample, and copy this URN in /www/views/index.js, replace the one for "urnprod", around line #20.
50
-
* In /www/views/index.js, around line #28, make sure the variable staging is false.
51
-
* In /www/views/index.js, around line #31, change value of tokenurl to get token through Node.js server
52
-
* In /www/views/index.html, use viewer3D.min.js and style.css from production environment
53
-
* Run the server: "node server.js" from command line
54
-
* Connect to server locally using a WebGL-compatible browser: http://localhost:3000/node/basic
55
-
56
-
To work with staging, only option B is available currently.
57
-
* Apply your own credentials from http://developer-stg.autodesk.com
58
-
* Install Node.js
59
-
* Run "npm install" command from the server directory to install the necessary packages which are mentioned in Dependencies..
60
-
* Replace the place holder with your own credentials in credentials-stg.js
61
-
* Upload one of your model in your account and get its URN using other workflow sample,for example, [this workflow sample in .net winform application](https://github.com/Developer-Autodesk/workflow-dotnet-winform-view.and.data.api/) if you are using windows or [this workflow sample in Mac OS Swift](https://github.com/Developer-Autodesk/workflow-macos-swift-view.and.data.api) if you are using Mac. But please use [staging URL](https://developer-stg.api.autodesk.com) to proceed the workflow.
62
-
* Get your model urn from the workflow sample, and copy this URN in /www/views/index.js, replace the one for "urnstg", around line #23.
63
-
* In /www/views/index.js, around line #28, make sure the variable staging is true.
64
-
* In /www/views/index.js, around line #31, change value of tokenurl to get token through Node.js server
65
-
* In /www/views/index.html, use viewer3D.min.js and style.css from staging environment
66
-
* Run the server: "node server.js" from command line
67
-
* Connect to server locally using a WebGL-compatible browser: http://localhost:3000/node/basic
51
+
* Copy this URN in /www/views/index.js at line #18 <br />
52
+
```
53
+
var urnprod = 'your_urn_here';
54
+
```
55
+
* Run the server from the Node.js console, by running the follwing command: <br />
56
+
```
57
+
node server.js
58
+
```
59
+
* Connect to server locally using a WebGL-compatible browser: [http://localhost:3000/node/basic](http://localhost:3000/node/basic)
60
+
61
+
#### To work with the staging environment, you need to use Option B.
62
+
* Apply your own credentials from [http://developer-stg.autodesk.com](http://developer-stg.autodesk.com)
63
+
* Replace the place holder with your own keys in credentials-stg.js, line #23 and #25 <br />
64
+
```
65
+
credentials.ClientId = '<replace with clientId>';
66
+
credentials.ClientSecret = '<replace with clientSecret>';
67
+
```
68
+
* Upload one of your model in your account and get its URN using other workflow sample,for example, [this workflow sample in .net winform application](https://github.com/Developer-Autodesk/workflow-dotnet-winform-view.and.data.api/) if you are using windows or [this workflow sample in Mac OS Swift](https://github.com/Developer-Autodesk/workflow-macos-swift-view.and.data.api) if you are using Mac. But please use [staging URL](https://developer-stg.api.autodesk.com) to proceed with the workflows.
69
+
* Copy this URN in /www/views/index.js at line #19 <br />
70
+
```
71
+
var urnstg = 'your_urn_here';
72
+
```
73
+
* In /www/views/index.js, around line #24, make sure the variable staging is true.
74
+
* In /www/views/index.html (line $33 and #34), use viewer3D.min.js and style.css from the staging environment <br />
* Run the server from the Node.js console, by running the follwing command: <br />
80
+
```
81
+
node server.js
82
+
```
83
+
* Connect to server locally using a WebGL-compatible browser: [http://localhost:3000/node/basic](http://localhost:3000/node/basic)
68
84
69
85
70
86
## License
71
87
72
88
That samples are licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details.
73
89
74
-
##Written by
90
+
##Written by
75
91
76
92
Written by [Philippe Leefsma](http://adndevblog.typepad.com/cloud_and_mobile/philippe-leefsma.html)
0 commit comments