redfieldstefan/mixandstones — pull request #6 by david-davidson (2014-11-24 01:59:01+00:00)
Title: Baby steps: first server-side rendering with React!

It's not much, but here's some server-side rendering with React!
To check it out:
1.) run `npm install` to grab new dependencies
2.) Add some drinks to the database:
* Start the server with `node server.js`
* Install superagent-cli globally--a tool that lets you post in new data: `npm install -g superagent-cli`
* Add drinks (see below*)
3.) Navigate to, say, localhost:3000/gin-and-tonic

* Enter each of these from the command line:
superagent http://localhost:3000/api/cocktails post '{"name": "Gin and Tonic", "ingredients": ["gin", "tonic"], "description": "This classic cocktail is just as happy serving as a well drink as it is going artisinal and high-end"}'

superagent http://localhost:3000/api/cocktails post '{"name": "Yogurt Sunrise", "ingredients": ["whiskey", "gin", "tequila", "rum", "vodka", "yogurt"], "description": "why not?"}'

superagent http://localhost:3000/api/cocktails post '{"name": "Whiskey, neat", "ingredients": ["whiskey"], "description": "Three or four fingers, plz"}'

superagent http://localhost:3000/api/cocktails post '{"name": "Old fashioned", "ingredients": ["rye", "soda", "bitters", "other stuff?"], "description": "cocktail game Don Draper"}'

superagent http://localhost:3000/api/cocktails post '{"name": "Seven & seven", "ingredients": ["Seagrams", "7-up"], "description": "Had one of these once"}'