evertonrobertoauler / universal-demo-v5

26 stars 14 forks source link

production deployment #4

Open mapsgeek opened 6 years ago

mapsgeek commented 6 years ago

so i followed the tutorial and the app running fine on localhost but i assumed that i can take the dist folder and host it anywhere by running node server.js from inside the dist folder but it didn't work ! any clue about how should this be deployed ?

evertonrobertoauler commented 6 years ago

This application is an Express.js app, you could deploy it following any Node.js Deployment Guide.

You can use: AWS, Heroku, Firebase with Firebase Cloud Functions, or any other hosting service that supports Node.js applications.

This is an awesome demo with Firebase with Firebase Cloud Functions:

https://www.youtube.com/watch?v=gxCu5TEmxXE

mapsgeek commented 6 years ago

thanks i figured out the deployment issue, but i have another issue if you please can help me with it, which is the httprequest made via transferstate. it works as it should be only when the request is made from a route component, but when the request is coming from a component related to a route, the request happens on the client, and if you reloaded the page of that component it happens on server only. is there a way to keep all requests on the server even if the component was loaded via angular router ?