If you don't have homebrew installed - get homebrew here
Then run: brew install elasticsearch
Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml
.
If you don't have homebrew installed - get homebrew here
Then run: brew install elasticsearch
Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml
.
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'
import React from 'react'; | |
import { getDisplayName } from 'common/utils/hocUtils'; | |
export default function withImageFadeInOnLoad(ImageComponent) { | |
class FadeInImage extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
imageLoaded: false, | |
}; |
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import styled from 'styled-components'; | |
const EnhancedImageContainer = styled.div` | |
height: 100%; | |
width: 100%; | |
border-radius: ${props => props.circle && '50%'}; | |
background-image: ${props => props.fallback && 'linear-gradient(135deg,#846170,#8e8485)'}; | |
display: inline-block; |
// Currently not active | |
// Webpack1 config for production | |
const path = require('path'); | |
const webpack = require('webpack'); | |
module.exports = { | |
entry: [ | |
path.resolve(__dirname, 'client', 'index.jsx'), | |
], |
// Currently not active | |
// Webpack1 config for development | |
var path = require('path'); | |
var webpack = require('webpack'); | |
var buildPath = path.resolve(__dirname, 'public', 'build'); | |
var PORT = process.env.PORT || 3000; | |
module.exports = { | |
entry: [ |
// For Webpack 2 | |
var path = require('path'); | |
var webpack = require('webpack'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
var HTMLWebpackPlugin = require('html-webpack-plugin'); | |
const PORT = process.env.PORT || 3000; | |
var production = process.env.NODE_ENV === 'production'; |
Code examples from this stack overflow answer.