Ad

How Can I Tell If Prerender.io Is Running Correctly On Modulus.io?

- 1 answer

UPDATE

I am able to install prerender on the modulus server now. BUT there is a problem with where to place the prerender token:

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

Where in the .demeteorized node app does this line go?


I am running a meteor app on modulus.io I have installed the https://github.com/prerender/prerender-node package. The tests pass locally to run phantom.js. Meaning, it puts the page together, with all meta tags, alt for imgs, title, page content and links.

Once modulus deploy is run, it shows /.demeteorized/package.json:

{ ...
 "dependencies": {
    ...
    "prerender-node": "https://registry.npmjs.org/prerender-node/-/prerender-node-1.0.6.tgz",
    ...
  } 
  ...
"PrerenderIO": {
    "token": "mYg3n3rAt3dTo0KeN"
}

}

In main.js, file contents:

process.argv.splice(2, 0, 'program.json');
process.chdir(require('path').join(__dirname, 'programs', 'server'));
require('./programs/server/boot.js');

The logs in prerender.io show:

> [email protected] start /mnt/app
> node main.js

Found package.json: ./package.json
Start script specified in package.json: node main.js
Initializing Node.js 0.10.36
Now using node v0.10.36
Running command: npm start

Is this all that is needed to run prerender service on modulus? What am I missing?

Ad

Answer

I could not get the app to run properly after it was demeteorized. I was getting multiple errors on various npm packages when I attempted to launch the node app.

I ended up dropping modulus and prerender and used digital ocean with phantomjs and spiderable. Deployed via mup. All good seo works.

Ad
source: stackoverflow.com
Ad