I am working on a mern stack project where i am using local storage to store some data and then use it on front-end. It is working fine on local host but i need to deploy my app on heroku. I was wondering how i would manage this local storage part on heroku.
-
2localStorage has nothing to do with heroku. localStorage stores your information in the machine's browser. Right click -> Inspect -> Application -> localStorage. You will see your information here – josemartindev Apr 15 '19 at 13:35
-
That wasn't answer to my question – uno96 Apr 15 '19 at 20:13
-
2I have an app deployed to heroku. It wont save the token in the localstorage while the app works fine on dev environment. Because of this the authentication is denied when page reloads. – Junaid Shirwani Mar 03 '20 at 16:07
-
2Did you fix this? I have the same problem – arthuro ali Jul 16 '20 at 20:49
1 Answers
Before everything answer is NO. You can use it but file will disapear.
Source: https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted
Youy mean on file storage it's ok. Heroku dont have permament file storage. It means files out of git repo will be deleted on every sleep. Please try and notify me about:
Custom ftp server connection are NOT possible! Direct FTP access to Heroku?
Helping: try free plan for aws, azure, gcloud.
- Go to heroku app setting tab on web panel.
- Open global env vars popup.
You must read : https://devcenter.heroku.com/articles/sftptogo#configuring-dns-for-custom-subdomain
It is little problem if you wanna 0$ cost. It is some kind of a sandbox. Every trick will be limited.
You need to open and verify credit card it is free on azure , aws or gcloud. Take a look for free quotes and get access data.
Heroku is aws oriented by my opinion maybe it is best for this choose to take aws.
Please notify if you have some success.
Good luck!

- 4,001
- 6
- 44
- 75