1.0.0 • Published 6 years ago

forge-model-uploader v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

modelderivative-nodejs-tutorial

Node.js npm Platforms License oAuth2

Viewer

Description

The following project is a demonstration of the use of the Forge API Node package module to recreate the following workflow.

  • Create a 2-legged authentication token
  • Create a bucket (an arbitrary space to store objects)
  • Get a list of all available buckets
  • Upload a file to the bucket
  • Prepare the file for displaying in the Viewer (translate the file into SVF format)

npm.io

Steps to debug

Follow these instructions to get the app running locally:

> git clone <THIS-REPO>
> cd TO-REPO-PATH	
> npm install

This will install all the neccesary dependencies the project has, which are specified in the package.json file, and also run you the steps speciefied before to get as a result the URN of your transalated file.

Now make a copy of the forge_auth.sh.example file provided in the repo

> cp forge_auth.sh.example forge_auth.sh

If using windows

> copy forge_auth.sh.example forge_auth.sh

Now you will need to go to the new created forge_auth.sh file and replace it with your own data in order to the use the sample. Once that is complete test the following so you make sure your data got correctly assigned to your ENV variables.

> source forge_auth.sh
> echo $FORGE_BUCKET_NAME // if you see your bucket name continue

npm start

If using Windows, unfortunately it does not have a built-in utility to support .sh files. To run such, you'll need to install a third-party tool such as Cygwin.

This URN can be used in the following project
Viewer-nodejs-tutorial

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Jaime Rosales D. Twitter Follow Forge Partner Development Forge Developer Portal

1.0.0

6 years ago