Wappler 7 Beta Node.js Question

I noticed on Node.js projects when you select the App level in the structure panel there is a tool to add Server Side Data in the properties panel?

As this is the code that is selected:

<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="index" appConnect="local" components="{dmxBrowser:{},dmxAnimateCSS:{},dmxBootstrap5Navigation:{}}" -->

When would you use this or is it suppose to be there?

Edit: So for fun I added a server connect to see what would happen? I got alerts saying it was added but can't see any change to the code? Where does it add the server connect?

And when you add a SC, the alert that pops up says the routes have been updated and uploaded?

Hello Brad!
I think that consumes a server action if needed.

For example this, where we can restrict the page:

Hmmm, ok makes sense, so where does the code get added and why does it say routes have been uploaded and saved?

You can see it on app/config/routes.json

image

image

Here's another example:

Also within the Layout page you can use this to populate Dynamic Meta items for the head content. But be sure to select Page and not Body in the App Root.

3 Likes

Comes back to a question that I posed many moons ago: Why not set it on the page to start off with and not have a choice of page and body?

This will avoid confusion for newcomers.