Hi,
Great tutorial, I've successfully deployed my app, but there is no CRUD functionality. Can you provide any insight as to why? There seems to be little consensus as to why that is, and with fewer solution. Any help would be appreciated. Thanks!
kicksstarter.herokuapp.com
Hello!
I deployed my MERN app to Heroku, it is rendering properly and my third-party API search function works well. However, it seems like my GET and POST methods to add new data is not working now. I also lost the datas that were originally stored on my database. I got the below errors:
GET localhost/api/projects net::ERR_CONNECTION_REFUSED OPTIONS localhost/api/projects net::ERR_CONNECTION_REFUSED Uncaught (in promise) Error: Network Error at createError (createError.js:15) at XMLHttpRequest.handleError (xhr.js:87)
Originally I had the Mixed-Content error and I fixed that by adding the below to my index.html's head section: <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Here is link to my app: https://fierce-sierra-67905.herokuapp.com/
This is my first time deploying MERN app on Heroku and have struggled for a while. Any help would be much appreciated!
So there's, in my view, a better way to do this. The issue is by removing dist from the gitignore, every time you're committing to your main repo, you're committing all these changed dist files which is a bit annoying. Also when you're pushing to Heroku, it's pushing in all the non-built files as well, and other things it doesn't need.
What you can do instead is create a new git in the dist directory and push that to heroku. This won't work out of the gate, what you need to do is:
Now you're not tracking every change to a distribution file in your main git repo. You could script the above to make the process even easier.
I get the error Error: Cannot find module './dist/server.bundle.js'. I checked the dist folder and no server.bundle.js was generated.
Any idea what could be going wrong?
when adding your mongo url be sure to remove the <<>> around your username and password
Awesome work @jakeforaker ! Send a PR to mern-starter after adding a link to your story in readme.
sardar usama
student
Getting the error of can, not post /adminLogin, unable to get data from the database (MongoDB) can anyone tell me? thanks