Git Product home page Git Product logo

js-data-examples's Issues

Container module in rethinkdb example

Thank you for the hard work :) I think it would be awesome if the rethinkdb server and angular client examples worked with one another—ultimately is that your goal w/ this repo?

Is it possible to commit an example of the container module and associated config referenced in rethinkdb/app.js? container.resolve() seems to be responsible for creating the closure that bootstraps app.js...

var container = require('./container');

RethinkDB example not suitable for a multi-node cluster

Hi,

First of all, thanks for the sample! It's helping me to kickstart a project. However, if someone would run more than one replica of the socket.io server, horrible things would start happening, as instead of using a RethinkDB changefeed - which is one of the main reasons why people use RethinkDB in the first place - it just emits a message with changes which the specific server received. For example,

  • user 1 is connected with socket.io to server 1
  • user 2 posts data which get load balanced to server 2
  • server 2 saves data and emits a socket.io message
  • user 1 receives nothing

So all calls like messageService.sendCreateMessage('post', post); should be removed, and socket.io connection needs to be replaced with something like

function on_user_connected( ... ) {
    r.table("posts").changes().run(rConnection).then(function(cursor) {
        cursor.each(function (err, item) {
            ioServer.emit('post created or deleted or updated', JSON.stringify(item, null, 2));
        }
    };
}

I haven't worked up a specific solution yet, but I might post a more specific sample later.

Oauth Errors

Can't run the server examples because of OAuth errs. Some pointers on setting up the secrets and config would remove friction from checking this stuff out-

/Users/jeffwinkler/repos/js-data-examples/server/rethinkdb/node_modules/passport-github/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth2.js:66
  if (!options.clientID) throw new Error('OAuth2Strategy requires a clientID o
                               ^
Error: OAuth2Strategy requires a clientID option
    at Strategy.OAuth2Strategy (/Users/jeffwinkler/rep

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.