No description
Find a file
2024-11-24 04:52:39 -03:00
img origin fixed 2024-11-24 04:52:39 -03:00
routes origin fixed 2024-11-24 04:52:39 -03:00
services origin fixed 2024-11-24 04:52:39 -03:00
wwwroot origin fixed 2024-11-24 04:52:39 -03:00
.env_example origin fixed 2024-11-24 04:52:39 -03:00
.gitignore origin fixed 2024-11-24 04:52:39 -03:00
config.js origin fixed 2024-11-24 04:52:39 -03:00
docker-compose.yml origin fixed 2024-11-24 04:52:39 -03:00
Dockerfile origin fixed 2024-11-24 04:52:39 -03:00
LICENSE origin fixed 2024-11-24 04:52:39 -03:00
models.json origin fixed 2024-11-24 04:52:39 -03:00
package-lock.json origin fixed 2024-11-24 04:52:39 -03:00
package.json origin fixed 2024-11-24 04:52:39 -03:00
README.md origin fixed 2024-11-24 04:52:39 -03:00
server.js origin fixed 2024-11-24 04:52:39 -03:00

Development


Logo

Website viewer APS

------ Website viewer Autodesk Platform Services driven -----

Table of Contents
  1. Project Description
  2. Getting Started
  3. Contributing
  4. Contact

Project Description

APS model viewer implementation for marketing purposes. Logo

(back to top)

Getting Started

The Viewer is setup to be deployed with docker. Nevertheless it can be run standalone by installing nodejs on the target machine. If standalone, only the .env has to be created and populated. All other steps can be skipped.

Setup procedure for dmzlxv09.dmz.gruner.ch aka webapps.gruner.ch

Docker Setup

  • clone the Repo
  • Create a .env file in the project folder (from .env_sample), and populae it with the snippet below, replacing <client-id> and <client-secret> with your APS Client ID and Client Secret
  • upload the model via OSS Manager and insert the filename of the model presetModel=
APS_CLIENT_ID=<INSERT ID>
APS_CLIENT_SECRET=<INSERT SECRET>
APS_BUCKET=
presetModel=BPZ_00_GRU_SIT_STR_MOD_EXI_Powerhouse.rvt # Insert filename of the model
  • edit docker-compose.yml and change the port.
    ports:
      - "127.0.0.1:808X:8080"
  • edit the
  • Run the application, docker compose up -d in terminal
  • Open http://localhost:808X

NGINX Setup

  1. Edit the sudo nano /etc/nginx/nginx.conf.
    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  /var/log/nginx/host.access.log  main;

        location / {
                proxy_pass http://127.0.0.1:8080;
        }

        location ~/test(.*)$ {
            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header Host $host;
            proxy_pass http://127.0.0.1:8081/$1;


        }
...
  • copy the location ~/test..
  • adjust the path to your liking
  • adjust proxy_pass http://127.0.0.1:808X/$1;port to the port configured in your docker-compose.yml
  1. reload nginx to activate the new configuration sudo systemctl reload nginx.service.

The viewer should now be displaying the Model on the configured URL.

ASP Documentation

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Authors

Daniele Viero - daniele.viero@gruner.ch

David Friedrich - david.friedrich@gruner.ch

Development

Prerequisites

We recommend using Visual Studio Code which, among other benefits, provides an integrated terminal as well.

Troubleshooting

License

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