(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| Add the `replication` section to the mongod.conf file: | |
| ``` | |
| $cat /usr/local/etc/mongod.conf | |
| systemLog: | |
| destination: file | |
| path: /usr/local/var/log/mongodb/mongo.log | |
| logAppend: true | |
| storage: | |
| engine: mmapv1 |
| (use 'clojure.set) | |
| (def data | |
| {:Hailey {"Broken Bells" 4, | |
| "Deadmau5" 1, | |
| "Norah Jones" 4, | |
| "The Strokes" 4, | |
| "Vampire Weekend" 1} | |
| :Veronica {"Blues Traveler" 3, |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| MIT License | |
| Copyright (c) 2014 Piotr Kuczynski | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWAR |
| angular.module('EventUtil', []) | |
| .factory('broadcast', ['$rootScope', function($rootScope){ | |
| return function(eventName, payload){ | |
| $rootScope.$broadcast(eventName, payload); | |
| }; | |
| }]) | |
| .factory('listen', ['$rootScope', function($rootScope){ | |
| return function(eventName, listener){ | |
| $rootScope.$on(eventName, listener); | |
| }; |
| var express = require('express'); | |
| var RedisStore = require('connect-redis')(express); | |
| express.socketio = require('socket.io'); | |
| var app = express.createServer(); | |
| app.configure(function() { | |
| app.use(express.cookieParser() ); | |
| app.sessionStore = new express.session.MemoryStore(); //Not recommended for production use | |
| app.use(express.session({ |