Enable remote deployment
david-pfx opened this issue · 2 comments
david-pfx commented
For deployment to node hosting such as Heroku etc I think a few things are needed, such as
- ui-react SPA statically loadable from the public directory (port 80)
- server-node port configurable
- a better way to handle the uploads and pix paths.
I'm sure there will be more.
evoluteur commented
To answer your points:
- Try making a build using "npm run build".
- Per your suggestion, I added process.env.PORT as default port ("apiPort" in config.js).
- There are many ways to implement upload. I kept it as simple as possible. It will do for now.
david-pfx commented
Building is easy enough, but configuring is still a problem. I think you need to move to making all the ports and paths (UI and server) runtime configurable, using data rather than needing to edit the config.js and rebuild. There may be other issues, depending on the hosting. Someone needs to try it!