This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bot-mate by Zero.One (http://www.zeroone.st) | |
// Simple nodejs server, that receives request with _escaped_fragment_ parameter, and renders back client-side gererated html from given host. | |
// Useful for single-page apps, with hashbang-style routes, to make them crawlable, and bot-friendly. | |
// (Read this great article for details: http://pivotallabs.com/seo-friendly-single-page-apps-in-rails/) | |
// | |
// Requirements: node and phantomjs in your PATH. | |
// TODO: Exception handling | |
// TODO: Caching support | |
// TODO: Add Nginx and Apache config example | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
devtool: 'eval', | |
entry: [ | |
'webpack-dev-server/client?http://0.0.0.0:3000', | |
'webpack/hot/only-dev-server', | |
'./app/index' | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Use within same directory as node_modules | |
mv node_modules/babel-runtime node_modules/babel-runtime-bak | |
git clone [email protected]:loganfsmyth/babel.git node_modules/babel-patch | |
cd node_modules/babel-patch | |
git checkout runtime-typeof-error-T6644 | |
npm install | |
make | |
make build-dist | |
cd ../../ | |
cp -r node_modules/babel-patch/packages/babel-runtime node_modules/babel-runtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fork/clone master branch: [email protected]:ctrlplusb/react-universally.git | |
cd [your-repo] | |
yarn install | |
edit config/index.js | |
change line 23: | |
port: getIntEnvVar('SERVER_PORT', 1337), | |
to: |