Sever Side Rendering with NodeJS

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.

No.

Server side rendering creates HTTP requests, while client side rendering is performed within the browser; no page refresh.

Use HTTP/2 (even better: HTTP/3) and a CDN plus a Service Worker that caches the data for returning users,

image

Thanks for your help Ben!

Is this Service Worker be installed within or outside Wappler by a knowledge limited user like me? Or is this a subscription service by a third party?

What would you recommend?

Hi Ben,

Thank you for the response.

I tried to follow what you are doing here

However, I experience the error ‘JSON Data Source Not Found’.

I put the JSON data inside views/data folder.

Any step that I missed here?

Thank you!

Have a look at

Have you inserted a JSON Data Source to the page?

image

Thanks Ben!

Hi Ben,

Yes, I do. I guess this is a bug?