brad
November 1, 2024, 6:14pm
1
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?
brad
November 1, 2024, 6:34pm
2
And when you add a SC, the alert that pops up says the routes have been updated and uploaded?
franse
November 1, 2024, 6:49pm
3
Hello Brad!
I think that consumes a server action if needed.
For example this, where we can restrict the page:
You can apply security to your pages and redirect users who are not logged in or have no permissions to view a specific page.
Security Protection with NodeJS
Security Provider setup with NodeJS is similar to what you are used to do for the other server models (PHP / ASP / ASP.NET ), the different in the workflow is the way you restrict access on the pages. For PHP, ASP and ASP.NET you would do this using the Security Enforcer on the page, while with NodeJS you apply the restrictions on the Ser…
brad
November 1, 2024, 6:51pm
4
Hmmm, ok makes sense, so where does the code get added and why does it say routes have been uploaded and saved?
franse
November 1, 2024, 6:55pm
5
You can see it on app/config/routes.json
Cheese
November 1, 2024, 7:01pm
7
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
ben
November 2, 2024, 2:12am
8
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.