Your local setup you mean?
Both, really. I know I have Node.js installed on the server but have no idea to actually use it!
From Wappler or bypassing Wappler?
There are dozens of strategies well documented out there on the web. Or maybe you are referring to how to do it from Wappler’s UI.
Yep, doing this from Wappler. The current way of working I’m completely familiar with - where the files go, connecting to the database, etc. This is a new structure for me so I’m just trying to get some knowledge on it.
How do you move your files? SFTP? If so I believe nothing changes for you. You create your nodeJS app via cpanel and define the server folder where the files will live in your server and then you just upload them from Wappler. For the DB you just create the connections in DB manager.
See also another great use case to package your whole dynamic database driven site as a standalone offline desktop app!
Bet you can’t do that with PHP
You could do it with PHP (installing and running a lite webserver) but no-one would want to!
true - but it will be a total overkill.
With Node it is so light that it is all natural and easy to bundle in an app
How have you managed to keep this under wraps until now? Seeing all the mention of NodeJS for months while developing the integration of it and not letting on! It must be a relief now it’s common knowledge.
With Wappler we like to surprise
So currently Wappler supports server action scheduling (as cron jobs) for php and asp, but not yet for node.js. Is that correct?
Well you can run the server actions as any other php file, using cronjobs.
In the new NodeJS integration - NodeJS is also your webserver so you have full control.
We will be integrating full scheduler in it, so you will be able to schedule Server Connect actions to run automatically. Just as you do now with cron jobs - but with NodeJS it will be all done within Wappler - so much more easier and flexible.
So what is involved in doing that?
- Change Target Server Model from PHP to NodeJS.
- Then what?
So you go into each Server Action?
What do you do?
Do you have to write each one from scratch again?
I am copying the json that forms the SC action and then adjusting. It’s in that adjustment that a second instance would be handy.
Isn’t the serverconnect framework agnostic of the server model? Shouldn’t all server action files works just fine when changing the server model. Shouldn’t the extra effort be just around setting up the “server”?
Easy to say, but practically might be hard. I just wanted to understand how much of effort is it to make the “switch”. Of course, I’m not going to change my server model on the daily basis…
It is. The framework.
But the files that have the SC action data(json) are dependent on server model.
So for PHP model the json is enclosed in .php files and have some overhead. For node they are pure json with no overhead.
Thanks for providing clarity on that @JonL… never bothered to look under the hood…
George’s converter makes sense now, and becomes essential now!
I’ve created a brand new NodeJS project to give it a quick blast. Setting up was pretty painless - downloaded and installed NodeJS, then Docker, then created my index.htm page and browsed to it at http://localhost:3000. All good.
But… I can’t see where 3000 was set and what would happen if I create another new project. Docker says there are no containers running so I’m guessing Wappler has done something directly with Docker?
Finally, does Docker support MySQL or MariaDB? Just getting the basics in place and then I can start switching to NodeJS for future projects.