Sever Side Rendering with NodeJS

how do I do this part of this tut…

https://community.wappler.io/uploads/default/original/3X/f/b/fb63edaac6fd1386e011ded82fbe95de579d8282.jpeg

I don’t understand your question.
The tutorial shows everything you need. Just follow it step by step!

how do I create the meta_tags server action… the steps… for this particular tutorial.

I know how to create a server action…

Everything is explained in the tutorial, please follow it from the beginning.

actually, this part is not laid out…

how do you create a server action that returns the data for the meta tags?

Well it’s a simple server action with a database query which returns the data for the meta tags. You can filter it, by some URL param, so the info changes per page as explained here:

ah yeah, so then you have to create a database table to hold that data? i think that part was not clear.

If you want to have dynamic meta tags then the data needs to come from somewhere - like a databae :slight_smile: Otherwise for static meta tags you can enter them manually.

haha yeah… i created a json file to hold the data… pieced together based on a bunch of different tutorials / videos i saw here, and then tried to use that but then couldn’t get it to work properly.

i thought i might need to switch over to a db, but thank you for confirming!

1 Like

Sorry for bumping this topic up but I have gray area with this.
Is it right that currently SSR on NodeJS works only for meta tags but not for cotnent?
So in source code I can’t “convert” some how dynamic data binding content in source code from: <h2>{{sc_get_coin.data.get_info.info}}</h2> to <h2>Info text</h2>?

Only by using some external services like prerender.io?

Why is that requirement?

For instance SEO and crawlers bots (robots) that scans web sites for content.

Well the search engine crawlers render the javascript data on your page so it’s perfectly fine to use {{expression}} there … no issues with SEO.

1 Like

Thank you for clarifying.

Anyway, you can always add server-side bindings from the server action selected on the page using this option:

2 Likes

Hi,

I tried to follow this tutorial from beginning.
Somehow I’m lost when ‘Content Page Setup’ part.
Why my content page, server-side data parts are different from your screenshot?
Screen Shot 2022-04-06 at 18.57.25

And when I click the select server action, I only find ‘API’. I can’t find the Server Actions folder with meta tags as per the screenshot?

Am I missing some steps?

Teo:

I’m curious, will server side rendering with NodeJS speed up the data delivery on the page? Or is there another way to speed up a query to display the data?

hi, @Teodor any chance to respond to my question above?
Still can’t figure out how to set up the content page

I tried directly write the page title & description to server side data, but somehow those page template not updated when navigate across the page.

Any way to change the title (from Layout template data) when navigate to change page?

Have a look at

Near the bottom, I show the database version which is what you are alluding to.