I have configured a new project using NodeJS as server model as described in the docs.
Everything is working well. I was also able to publish the app to my shared cPanel hosting.
Now, everytime I save a file, I see an error saying restart.txt not found. I tried creating the file manually in the tmp folder, but it keeps deleting itself.
I have two targets set. One for local deployment & other FTP.
I am not sure, but I think when I am on FTP as target, the local server is still running and that is deleting the restart.txt file.
Can someone please help me figure out how to make restart.txt work? Since without that, I will have to manually go into cPanel to restart Node application everytime I make any changes.
We have received this error as well. I am not 100%, but I think it is from not all files being uploaded to the server first. We seem to always get the error when first setting up a project, then after the next couple of tries it works for us. Sorry I can’t be more help.
I did read these docs. But it does not mention why a separate folder is needed?
The current setup works fine for me except for the restart.txt file.
Can you please share some info on why I need a separate folder?
Thats correct. I did get that. But I still don’t understamd WHY?
I have published my project without this, and it still works. Except for the restart.txt part.
Moved everything to the /app folder. Website is running as earlier. But still seeing the same error.
FYI: The remote server is a sub-domain, with the FTP account having access only to the sub domain’s folder.
Can you view the files on your remote server? We had issues that Wappler would not create the tmp folder via ftp on the remote server. After multiple publishes, it would add it. Wappler sometimes has an issue of not placing the parent folder on a file via ftp.
The main.ejs in layout is not really in use. I had first configured the layout template format, but then switched to regular HTML to make it SPA.
The error was present in the layout template structure as well.
In the tmp folder shown in structure, I can see the restart.txt file getting created, but it just disappears before Wappler gets a chance to upload it after I save a file.
Additionally, here is the local development target settings that was created atuomatically:
I did check that. I even cleared out the remote folder completely and did a full publish. The tmp folder did get created in the remote directory but the restart.txt file error presented itself even at that point because it was deleted before Wappler got a chance to upload it.