Autodesk-Forge / forge-designautomation-tools

Migrated to https://github.com/autodesk-platform-services/aps-design-automation-tools
http://da-manager.autodesk.io
MIT License
18 stars 9 forks source link

Cannot launch app locally after downloading repository #4

Open wisenickel5 opened 2 years ago

wisenickel5 commented 2 years ago

After downloading this repository, I installed the necessary packages with npm, and hard coded the environment variables into config.js but I cannot connect to localhost at all. No errors are showing in my terminal or in the browser console, so I am not sure where to start debugging.

I tried installing nodemon to see if that would change anything but had no luck. To clarify, after running npm run nodemon I see logs in the terminal that read:

Starting at Thu May 05 2022 21:46:39 GMT-0400 (Eastern Daylight Time)
Listening on port 3000

But when you try and visit https://localhost:3000/ I am met with the vague "ERR_SSL_PROTOCOL_ERROR". Any help is greatly appreciated. If more context is needed around my issue I'd be glad to provide it.

ricaun commented 2 years ago

I had the same problem if you remove this line disforce the https

https://github.com/Autodesk-Forge/forge-designautomation-tools/blob/da2aac327dcb35793e65c8673c0171da209be70a/server/server.js#L28

or add the a if (process.env.NODE_ENV === 'production')

if (process.env.NODE_ENV === 'production')
    app.use(enforce.HTTPS({ trustProtoHeader: true }));

I did not test on the production.