forge-photoii3d

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2018 License: MIT Imports: 1 Imported by: 0

README

(Work in progress) forge-photoII3D

Build Status Go Report Card Platforms License

Autodesk-HIG

Forge API: oAuth2 Reality-Capture

forge-photoII3D is a sample illustrating use of Forge Reality Capture API.

Setup

Set the FORGE_CLIENT_ID and FORGE_CLIENT_SECRET environment variables with your Forge secrets.

Grab the zip archive from the releases page and un-archive it into favorite folder.

Alternative install:

If you have Go already setup, and you want to build it by yourself, run:

go get -u github.com/apprentice3d/forge-photoII3D

change to created/updated directory:

cd $GOPATH/src/github.com/apprentice3d/forge-photoII3D

and start it by running

go run main.go

or build it by running

go build

Keep in mind that you have to build the frontend too, thus switch to `frontend_src' and run

npm run build

that will build (transpile, compress and bundle) the html/js/css code and place it into client folder in source root for server to serve.

Usage

This app works on port 3000, so make sure it is available.

To start the app just run the forge-photo23d executable.

If everything is setup, you should see a terminal window like this:

image with terminal window here

meaning that the web app can be accessed at http://localhost:3000

with following workflow:

image with a general presentation here

Source code usage:

This sample code contains 2 parts:

  • a React powered frontend, contained in frontend_src folder
  • a Go powered backend, mainly contained in server folder

The suggested approach for experiments and development is to:

  1. start the backed by running go run main.go
  2. start the frontend by switching to frontend_src, installing all dependencies by running npm install and start the frontend by running npm start

A separate start of the front end is necessary to have all the feature of hot-reloading activated, so upon saving the changes made to code in frontend_src, will be "auto-compiled" and reloaded.

Work on backed is as usual, any changes to the code will become effective only after restarting the server.

When experiments are final, run npm run buld within frontend_src folder. This will create a client folder in the root folder of the project, which will contain a transpiled, minimized and bundled version of the frontend, for server to serve.

Finally, after the client was build, the server will serve the frontend from that folder.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL