petrbroz / forge-sample-app-v2

Alternative implementation of learnforge.autodesk.io's Node.js sample code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

forge-sample-app-v2

An alternative implementation of learnforge.autodesk.io's Node.js sample code, focusing on a couple of things:

  • using fewer dependencies, removing unused dependencies
  • using ES6 features such as let/const, fat arrow functions, destructuring, and promises
  • using async/await

The code currently focuses on the server-side, so the front-end is very rudimentary.

Quick Start

  • get your Forge credentials: tutorial
  • clone the git repo
  • install dependencies: npm install
  • run the server
    • using Visual Studio Code:
      • add the following launch configuration
              {
                  "type": "node",
                  "request": "launch",
                  "name": "Launch Program",
                  "program": "${workspaceFolder}/start.js",
                  "env": {
                      "DEBUG": "express:*",
                      "FORGE_CLIENT_ID": "<your-client-id>",
                      "FORGE_CLIENT_SECRET": "<your-client-secret>"
                  }
              }
      • run the server via Debug > Start Debugging
    • using command line
      • FORGE_CLIENT_ID=<your-client-id> FORGE_CLIENT_SECRET=<your-client-secret> npm run start
  • go to localhost:3000

About

Alternative implementation of learnforge.autodesk.io's Node.js sample code.


Languages

Language:JavaScript 90.6%Language:HTML 6.5%Language:CSS 2.9%