Skip to content

Instantly share code, notes, and snippets.

View romanenko's full-sized avatar

Michael Romanenko romanenko

View GitHub Profile
@romanenko
romanenko / gist:d2f9bc895ead9870f666fe7e9a67b47e
Last active October 7, 2017 21:22 — forked from kurtzilla/gist:c134c74142ce59d0bdf2d90db7321dcb
Deploy react-universally to Heroku from start to finish
fork/clone master branch: git@github.com:ctrlplusb/react-universally.git
cd [your-repo]
yarn install
edit config/index.js
change line 23:
port: getIntEnvVar('SERVER_PORT', 1337),
to:
@romanenko
romanenko / patch.sh
Last active December 12, 2015 07:54 — forked from patrickheeney/patch.sh
Babel6 Patch
//Use within same directory as node_modules
mv node_modules/babel-runtime node_modules/babel-runtime-bak
git clone git@github.com: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
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'
],
@romanenko
romanenko / bot-mate.js
Last active December 22, 2015 02:48
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/).
// 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
//