GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Now prerender has bad restriction - it must be placed on a same server with a JS project.
Why we can't get html from baseURL?
I'll revisit this - the reason I'm reading index.html from the FS is so that I can manipulate the HTML before sending it to Phantom or JSDOM. I have a plugin hook called beforeInit, which gets used by the removeScriptTags.js plugin to remove Google Analytics and custom fonts.
I've merged in pull request #11 for dealing with this issue.
I'm now using the 'request' library to fetch the index.html page from baseUrl + applicationPage and then I feed the HTML into Phantom or JSDOM. This allows us to preserve the plugin logic for pre-processing of the HTML, such as removing Google Analytics code, etc.
In the future, I may try experimenting with telling Phantom and JSDOM to fetch index.html directly - I can use onResourceRequested to have Phantom skip certain hosts/files, and JSDOM has something similar called SkipExternalResources.
Let me know if you have any issues and I'll re-open.