5

I am unsure on how to setup prerender.io and node.js. On prerender.io it just says to add

app.use(require('prerender-node').set('prerenderToken', 'TOKEN'));

inside the app.

My code looks like this:

var express = require('express');
var app = module.exports = express();
app.use(require('prerender-node').set('prerenderToken', 'TOKEN'));
app.listen(3000);

When visiting http://192.168.x.x:3000/http://myangularjswebsite.com/?_escaped_fragment_ it takes a couple of seconds to load and then renders a blank page.

Any suggestions?

Alex
  • 1,060
  • 2
  • 17
  • 35
  • I had the same problem with it. I decided to use pushstate instead. For me it was a resource linking problem. Be sure every javascript and css resource is linked using "/" at the beginning. – T00rk Sep 09 '14 at 09:00
  • PhantomJS could have problems with your page or the Prerender server might think the page is done too early. Can you email me a real URL at todd@prerender.io? I'll be happy to look into it! – Prerender.io Sep 10 '14 at 02:00
  • Possible duplicate of [Crawl ng-view in angular js](http://stackoverflow.com/questions/30371348/crawl-ng-view-in-angular-js) – Paul Sweatte Aug 19 '16 at 17:36

0 Answers0