4

I developed a web site using AngularJS and Revel. But I found the SEO in the single page application is a big problem. I checked the https://prerender.io/getting-started , but I can't found the middleware for Revel installation. Could someone help me how do I contribute that for Revel?

John Weldon
  • 39,849
  • 11
  • 94
  • 127
user2311150
  • 49
  • 1
  • 2
  • I don't know what I'm missing here but isn't hashbang `#!` routing enough for Google to crawl single-page apps without a problem? https://developers.google.com/webmasters/ajax-crawling/ yes it has few downsides but overall it works without any 3rd party services. – ymg Apr 21 '14 at 01:40
  • @Yasir, not as of today. If you read through the articles on the link you supplied, they all mention serving static HTML snapshots. user2311150, no one has written the middleware for Revel yet. We have middleware in Apache/nginx if you're using one of those. Otherwise, feel free to write the Revel middleware and we'll link to it on https://prerender.io – Prerender.io Apr 21 '14 at 06:21
  • Added a backlog item for this https://github.com/revel/revel/issues/906 – Brenden Mar 23 '15 at 16:08

1 Answers1

0

I just stumbled on this topic by chance and I recently enable prerender (self hosted on docker) on an angular project running on node.

I use an nginx as frontend to proxy requests to the node app. Prerender intergrates well with nginx and would allow you to avoid integrating it into Revel in your case.

This is the basic schema for Prerender with nginx

Request ----> nginx 


if bot ?_request_fragment_ --> proxy Prerender app (will generate prerendered html if does not exist in cache ...

if normal request ---> proxy to Revel (node, your app ...)
sp4ke
  • 549
  • 2
  • 12