I followed this tutorial and I built this with it: http://x111.meteor.com/ But as you can see the loading is very slow, because meteor loads the data from client side.
I get this error when I want to use the global Template
inside Meteor.isServer
:
ReferenceError: Template is not defined
at app/products.js:56:3 ...
How do I serve the templates from server side so I don't have to wait for the client?
Server-side rendering (SSR) is an application's ability to convert HTML files on the server into a fully rendered HTML page for the client. The web browser submits a request for information from the server, which instantly responds by sending a fully rendered page to the client.
Meteor methods are functions that are written on the server side, but can be called from the client side.
The structure is displayed before data is visible. For example, The table, rendered in DOM, is displayed when the page gets loaded. Using Ajax, data comes from the server in the form of JSON and then the data gets attached to the table using getElementByID.
Server-side rendering is when content on your webpage is rendered on the server and not on your browser using JavaScript. For example, with a typical PHP or WordPress site, the page is loaded from content that is coming via HTTP, which was rendered on the server and comes as fully rendered HTML.
Try this. This package adds support for server side Handlebars in Meteor. It's primarily intended as a stop gap for server side email html until Meteor releases server side rendering support.
> mrt add handlebars-server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With