If I go to my cPanels File Manager I can see my new server action placed inside /app/api/ folder, however if I click the Test in Browser button I get
and if I try to use a binding from the action on my page I also get an error
I have 2 options, I can either wait about an hour or more and suddenly for some unknown reason it will become available like magic or I can go to cPanel and in the cPanel terminal app enter
cd app/tmp
touch restart.txt
Which then makes the action file work instantly.
What I do find odd about this is if I save a normal index.html file i am working with in Wappler it shows the alterations right away even though no restart.txt file has been sent, if I do a full publish in Wappler, sometimes the restart is sent, and even then without any output error, the action file is still not available and i have to do the terminal touch command.
Just an update, the publish in the video does not work either, however that is because there are no new files to publish, if I add a fake file in my file manager, and then publish, the restart is sent and works.
For Node, could we not just have another button in the get, publish, abort, area saying restart, there are often going to be times where things may be done, like manually updating something, or manually changing a file, or Patrick supplies a quick fix script update, and because cPanel is silly and does not have a restart button for the app, if Wappler had one then as a fallback it’s there if needed.
@George, between Brian and myself we have managed to get to the bottom of this restart.txt problem.
My cPanel root folder is /home/paul
I called my container folder for all my node files app so my application root folder was /home/paul/app, and these files are contained within, as you can see there will be instances where we land up with /home/paul/app/app/api
Changing the root folder to something different like nodejsapp like this
Has fixed the entire issue, now I can publish and/or save files and the restart.txt always gets add/removed perfectly and the node app restarts as expected.
EDIT: Question now is, is this something Wappler can account for and fix so the folder can be named app, or shall I amend my tutorial to make sure everyone that follows it is not calling their base folder app and landing in the same issue.
I wonder why it is not causing the same issue for Plesk from @Teodor tutorial just above, as his tutorial also uses the directory of app
I’m doing a manual install to a Centos instance on GCE and ran into this app issue as well. Your fix worked for me – just picking a different name kept everything in check.