Setting up local development help? #272
Replies: 4 comments 4 replies
-
First of all, which files are you trying to edit? As for why the changes don't take effect when you restart, that is more puzzling to me. My first inclination is that perhaps you're not changing what you think you are. More specifics would be useful to know. |
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back to me, so what I wanted to do was to play around and maybe build some other functionality. So the files I was changing were the ones from the pikaraoke directory (the ones that get updated when you do a git pull). I'm using the pre-built image you provided with the only difference that I had to do a git pull and ran the "./setup-pi.sh" script again. I was stopping the app and making visual changes to the app (the one you can access through a browser) but not seeing changes. I tried stopping the app and starting it again (sudo python3 app.py) but the changes still did not update. I was not using the --dev flag FYI. What should be the correct development process for making changes to the app and seeing them reflected? the changes I was making where in the templates (html files). Is the app being served from a build folder I am not seeing? Any help would be greatly appreciated, there are a lot of devs out there that would probably love to help out as well. I was even planning on building a react app (as I would feel a lot more familiarized) and use the API endpoints to control and fetch the data from the app. Cheers! |
Beta Was this translation helpful? Give feedback.
-
If I had to redo it, I would do it in react. Though last I checked performance with builds on raspberry pis can be disappointing. There is no build folder for flask. Restarting should definitely show the changes, and I have never heard otherwise from other contributors. So again, not sure what's going wrong there. Is it possible you're inadvertently editing a copy of the code that's running? |
Beta Was this translation helpful? Give feedback.
-
I actually just had a thought. If you're using the pre-built image, it auto launches on start from /etc/rc.local script. Perhaps its still running in memory and that's what you're looking at in your browser. Make sure to kill that first |
Beta Was this translation helpful? Give feedback.
-
I'm a developer but I have only ever worked with react and JS. I was hoping to do some changes and use this project to learn more about developing this kind of apps.
I was able to ssh into pi from my mac and load the pikaraoke in VSstudio, but the changes I'm making in this directory are not being reflected in the running program, even if I restart it. I was also able to spot the --development-mode flag but the new server port it opens just opens nothing for me.
Could someone share some pointers on how I can do local development and have my changes be reflected in the app when I run it? I believe the dev mode flag should allow me to do this but it is unclear how it is supposed to work.
Cheers
Beta Was this translation helpful? Give feedback.
All reactions