GithubHelp home page GithubHelp logo

mtabbal / forge-react-boiler.nodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from autodesk-forge/forge-react-boiler.nodejs

0.0 1.0 0.0 9.79 MB

A boilerplate project to quickly get started using Autodesk Forge Platform Web Services in a modern React + Node.js Web Application

Home Page: https://forge-react-boiler.autodesk.io

License: MIT License

JavaScript 24.34% CSS 75.45% HTML 0.21%

forge-react-boiler.nodejs's Introduction

banner

About Forge React Boiler

A boilerplate project to quickly get started using Autodesk Forge Platform Web Services in a modern React + Node.js Web Application. The base project is initially derived from the React Redux Starter Kit.

  • Main components of the Frontend:

React + Redux

  • On the Backend:

Node.js + Express

  • Build System:

NPM scripts + Webpack 2 + Babel

React Support

React >= 0.13.x

Browser Support

Forge React Boiler is responsive, mobile friendly and has been tested on the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Opera
  • Edge

Running the sample

Configuration is controlled by NODE_ENV environment variable, make sure to set it properly to development or production, based on the configuration type you want to run.

In development, the client is dynamically built by the webpack-dev-middleware, so just run:

  • npm install (downloads project dependencies locally)

  • set NODE_ENV=development

  • set HOT_RELOADING=true

  • npm start (builds client on the fly and runs server)

  • open http://localhost:3000 in your favorite browser

In production, the client requires a build step, so run:

  • npm install (not required if you already run at previous step)

  • set NODE_ENV=production

  • npm run build-server (builds server in /bin/server)

  • npm run build-prod (builds client in /dist)

  • npm start (runs server)

  • open http://localhost:3000 in your favorite browser

Loading custom models in the Forge Viewer

The project contains a default model located in /resources/models/seat that can be loaded with no further setup and will also work offline.

If you want to load a model from Autodesk Cloud, you first need to generate a viewable URN as documented in the Prepare a File for the Viewer tutorial.

Using the same Forge ClientId & ClientSecret used to upload the model, populate environment variables used by the config files (in /config):

  • development:

    FORGE_DEV_CLIENT_ID

    FORGE_DEV_CLIENT_SECRET

  • production:

    FORGE_CLIENT_ID

    FORGE_CLIENT_SECRET

Restart the server, you can then directly load your model by specifying design URN as query parameter in the url of the viewer page:

http://localhost:3000/viewer?urn=YOUR_URN_HERE

Deploy to Heroku

Use your Forge ClientId & ClientSecret obtained while Creating a new Forge App

And Press Deploy button below:

Deploy

Wait for a while once the Heroku App has been deployed as the client needs to be built after the first run

More about Autodesk Forge Platform and Web Applications of the future?

Check it out at developer.autodesk.com.

Look at our Quickstarts Guide to find the Forge SDK's for the programming language of your choice.

About the Author

https://twitter.com/F3lipek

Web Applications using Forge React Boiler

forge-rcdb

(Feel free to add your own by submitting a pull request...)

forge-react-boiler.nodejs's People

Contributors

leefsmp avatar mtabbal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.