Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
for (var i=1; i <= 20; i++) | |
{ | |
if (i % 15 == 0) | |
console.log("FizzBuzz"); | |
else if (i % 3 == 0) | |
console.log("Fizz"); | |
else if (i % 5 == 0) | |
console.log("Buzz"); | |
else | |
console.log(i); |
var db = mongoose.connect('mongodb://localhost:27017/DB'); | |
// In middleware | |
app.use(function (req, res, next) { | |
// action after response | |
var afterResponse = function() { | |
logger.info({req: req}, "End request"); | |
// any other clean ups |
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin <branch-name> |
'use statics'; | |
export default { | |
FETCH_ME: 'FETCH_ME', | |
FETCH_LIKES: 'FETCH_LIKES', | |
FETCH_TRACKS: 'FETCH_TRACKS', | |
FETCH_USER: 'FETCH USER' | |
}; |
So migrating my existing app wasn't as troublesome as I originally thought. First thing I did was take a look at my router and routes
and figure try to make a mental model of all the files where I had nested routes in the existing app because those components/containers will contain {this.props.children}
. So I need to replace those with the nested <Match />
components.
So just to give an example:
<Router history={history}>
<Route path="/" component={App}>
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.
Mongo Manual can help you with getting started using the Shell.
FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.