Code Monkey home page Code Monkey logo

aim's People

Contributors

benlesh avatar jeffbcross avatar robwormald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aim's Issues

Create login component

Create a component that authenticates with Github, and broadcasts success and failure events.

@reactivex bundled 2 times

@ReactiveX is included 2 times in the WebPack: once from the "root" npm dependency and second time from ng2 transitive dependencies. Not big deal for demos but I guess people might be using this (and other) projects as starter kits, so would be good to fix.

Unfortunately my WebPack-foo is pretty weak so I'm not sure how to fix it atm.

Oh, and BTW: is there is any particular reason for explicitly declaring all the ng2 transitive dependencies? (zone, reflect-metadata, @ReactiveX)? This might be actually a reason for those things being bundled twice.

Socket sends all previous messages on retry

Hi!

We are using this web socket implementation. On page load everything is correct and we start sending messages etc. When we loose connection and it gets back again the websocket sends ALL previous messages directly (the messageQueue is empty).

I've commented out this section and now it just creates a new connection without sending anything.

.retryWhen(errors => errors.switchMap(err => {
      // update the connection state to let it know we're retrying
      this.connectionState.next(ConnectionStates.RETRYING);
      
      if(navigator.onLine) {
        // if we have a network connection, try again in 3 seconds
        return Observable.timer(3000);
      } else {
        // if we're offline, so wait for an online event.
        return Observable.fromEvent(window, 'online').take(1);
      }
    }));

How can we make this not send old messages? We still want the retryWhen code since we need to do stuff when we gets back online.

Thanks

error TS2307: Cannot find module 'express'

Not familiar with typescript as of yet, perhaps I should just create a vanilla node express server and use that. Using a windows 7 box.

after install on
npm run server

ERROR in c:\wamp\www\ng2\aim\server\stock_server.ts
(4,26): error TS2307: Cannot find module 'express'.

the express node_module is there

Create chat list component

List of active conversations. Should have conversations with unread messages with bold text and a number indicator.

Implement app component

App component should show login component if user is not already logged in.
If user is logged in, the component should register the user with the WebSocket service #3.

service.registerUser({token: 'GITHUB_AUTH_TOKEN', username: 'jeffbcross});

Create a socket-based service to manage conversations

Needs to manage connection with a websocket that will send and receive messages with the app.
Needs to implement multiplexing logic to use a single websocket subscription for many conversations.
Needs to handle reconnecting gracefully.
Needs to support creation of new conversations.

Potential API:

enum ConnectionStates {CONNECTED, CONNECTING, WAITING_TO_RETRY}
interface Message {
  id?:string;
  channel: string;
  otherUser: string;
}

interface Channel {
  id?:string;
  // List of github usernames
  partcipants: List<string>;
}

interface User {
  username: string;
}

interface SelfUser extends User {
  token: string;
}

class ChatService {
  messages: Observable<Message>;
  connectionState: Observable<ConnectionStates>;
  activeChannels: Observable<List<Channel>>;
  createChannel(user:User):void {}
  registerUser(user:SelfUser):void {}
}

S2307: Cannot find module 'express'.

When tryig to run getting the below error. Please let me know what needs to be changed

ERROR in C:\Development\Angular\aim\server\stock_server.ts
(4,26): error TS2307: Cannot find module 'express'.

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.