Angular JS based SEO on Node.js backend server.
Install phantomjs
phantomjs show-rendered.js 'http://writebox.co.uk/#!/kanban'
will show the fully rendered html.
This can be added as child process that is run on your Node.js server and used as output for the crawlers.
Nginx config
if ($args ~ "_escaped_fragment_=(.+)") {
rewrite ^ /bots/$is_args$args;
}
Add an Express route similar to this :
/bots/:optional?*
which points to the Express endpoint for serving bots
var exec = require('child_process').exec;
...
// show-rendered.js lives in "bin/show-rendered.js" under the app
page: function page(req, res) {
var safe = req.query._escaped_fragment_.match(/[\w\s_-]+/g)[0];
var cmd = "phantomjs " + process.cwd() + "/bin/show-rendered.js 'http://" + req.host + "/#!/" + safe + "'";
exec(cmd, function (error, stdout, stderr) {
res.send(stdout);
});
}
Contact Mark
(0.0.1)
Just nick it and do what you want.