I’m looking at prerender.io to better crawl my app. However, how do you use prerender-node (the NPM package) on a meteor application? The docs are for express (app.require) and I’m not 100% sure what the meteor alternative to that is or where to put it in my app.
Been away for a while so apologies for the lack of a response. I actually found using the NPM package worked better than the Atmosphere package… for some reason. I don’t know why but the Atmosphere package wouldn’t send the pages through to prerender!
Unforunately, I have since removed that project so I can’t help with the setup. I may have a backup somewhere though so I’ll have a look on my other machine later.
// Use Prerender with your token
var prerenderio = Npm.require('prerender-node').set('prerenderToken', 'YOUR_TOKEN');
// Feed it to middleware! (app.use)
WebApp.connectHandlers.use(prerenderio);
which seems to work nicely and has similar (but limited) api as prerender.io, so you can use any existing middleware.
I use nginx config for prerender, because the node-version did not work very well (i had inifinte loops, because it did not remove ?escaped_fragment= )
Hi, I have recently implemented prerender-node and my own Node prerender server with EC2, for Meteor. If you’re looking for something similar, please let me know.