简体   繁体   中英

Can the official tutorial 'View-your-model' provided by Autodesk Forge be deploy on a real web server, instead of localhost:3000?

I have followed the "View Your Models" tutorial provided by Autodesk Forge, and the codes are running perfectly under both the IIS Express 10.0 and Tomcat 9.0 locally. I'm wondering if I can publish the same codes on a real machine, instead of like 'localhost:3000'.

I've tried to deploy the codes onto either IIS or Tomcat with an domain name/IP and a port, but it showed me all kinds of errors, such as:

Internal Server Error when deploying to IIS "iisnode encountered an error when processing the request"

Or

"net::ERR_ABORTED 404" accessing those client-side files (ForgeViewer.js or TorgeTree.js, etc) when deploying to Tomcat with a different port

It seems to me that the tutorial has to be run on virtual machine, with an URL like ' http://localhost:3000 '. Is that true?

Since your question is not related to the Forge platform directly, I would advise you to check these documentations from their vendors or other supports. For example,

Unfortunately that's not true - there's no fundamental difference between your "virtual server" (or IIS Express/Tomcat on your local terminal) and a "real machine"(or full IIS/Tomcat on a virtualized/bare metal server) ...

To answer your specific questions:

"net::ERR_ABORTED 404" accessing those client-side files (ForgeViewer.js or TorgeTree.js, etc) when deploying to Tomcat with a different port

When running apps on a detached Tomcat server you will need to explicitly specify servlet mapping to serve static files in your web.xml :

<servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/js/*</url-pattern>
</servlet-mapping>

Internal Server Error when deploying to IIS "iisnode encountered an error when processing the request"

This is too general to narrow the issue down - can you post the error log (browser output and see them persisted here ) in your question and leave a comment when you are done so I will fill out my answer here?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM