Closed pi0neerpat closed 6 years ago
The client folder is in the same folder as server.js, so I don't think this is the issue: https://stackoverflow.com/questions/46509186/how-to-correct-issue-with-nodejs-with-react-app-not-loading-content-properly-rel
I believe the issue is that I need to ensure that all the routes go to the same place i.e. send them to the main page. Currently app.use(["/" , "/~*"], express.static("client/build"))
is trying to send the user to a file in client/build/~<mnemonic>
which doesn't exist
Digital Ocean droplet 1 GB Memory / 25 GB Disk / NYC1 - Ubuntu 18.04 x64 / node v8.10.0
The root path "/" works fine, however when trying to navigate to a dapp "Cannot GET /~deliver-europe-chance" (using any mnemonic).
On firefox I get the following warning: Content Security Policy: The page’s settings blocked the loading of a resource at self (“default-src”). Source: !function(){return function t(e,r,n){fun.... On Chrome I don't get any warning.
NOTE: No issues when running locally, only when using the Digital Ocean server.
To achieve the same result-clone the branch productionBuild. Then
npm run start-production
to create a production build of the app and starts server.js in production mode.