Skip to content
Commits on Feb 5, 2016
  1. @hjanuschka @andreialecu
Commits on Jan 18, 2016
  1. @NicolasRitouet

    Fix typo

    NicolasRitouet committed
  2. @NicolasRitouet
  3. @NicolasRitouet

    Bump to v0.8.8

    NicolasRitouet committed
Commits on Dec 31, 2015
  1. @andreialecu @NicolasRitouet

    refactor(session): use socket.io rooms for emitToUsers

    andreialecu committed with NicolasRitouet
    This refactor allows deployd to scale socket.io across multiple nodes by not tying emitToUsers to internal state, but instead tying sockets to their uids using socket.io room functionality.
    
    It should also fix a small memory leak with an event emitter.
    
    Also, it adds new functionality in the form of additional configuration options:
    
    Example:
    ```javascript
    
    var redisAdapter = require('socket.io-redis');
    
    var server = deployd({
      port: process.env.PORT || 1337,
      ...
      socketIo: {
        options: {
          transports: ['websocket'],
        },
        adapter: redisAdapter({ host: 'localhost', port: 6379 }),
      },
    
    });
    ```
    
    Expose join/leave room functionality for sessions. Rooms are persisted in the session, so reconnecting the session will rejoin the same rooms.
    
    This exposes the `session` directly and the following additional methods:
    
    ```javascript
    session.joinRoom('roomname');
    session.joinRooms(['roomname', 'roomname2']);
    session.leaveRoom('roomname');
    session.leaveRooms(['roomname', 'roomname2']);
    session.leaveAllRooms();
    ```
    
    Usage example:
    
    On Login:
    ```javascript
    if (me.admin) session.joinRoom('administrators');
    ```
    
    Other script:
    ```javascript
    emit('administrators', 'eventname', { ... });
    ```
    
    Cleanup.
    
    Use pubsub via node_redis compatible client to sync up channels that sessions join across multiple nodes (cluster). Also syncs up session removal.
    
    Requires redis, but is optional. Needs configuration like the following:
    
    ```javascript
    var redis = require('redis');
    var sioPub = redis.createClient(process.env.REDIS_URL);
    var sioSub = redis.createClient(process.env.REDIS_URL, { 'return_buffers': true });
    
    var dpdPub = redis.createClient(process.env.REDIS_URL);
    var dpdSub = redis.createClient(process.env.REDIS_URL);
    
    var server = deployd({
      port: process.env.PORT || 1337,
      ...
      db: {
        connectionString: process.env.MONGO_URI,
      },
      sessions: {
        pubClient: dpdPub,
        subClient: dpdSub,
      },
      socketIo: {
        adapter: redisAdapter({ pubClient: sioPub, subClient: sioSub }),
      },
    
    });
    ```
    
    Also includes a bunch of tests.
    
    Some fixes.
    
    Don't leave uid channel when refreshing rooms.
  2. @andreialecu

    perf(script): memoize dynamic function

    andreialecu committed
    This improves performance when there are a lot of requests per second.
    
    Tested with 1000 requests per second:
    
    `loadtest --rps 1000 -k -t 20 http://localhost:1337/test`
    
    Where `test` is a simple Event Resource script that doesn't do any database interaction, and just returns a simple response.
    
    Before:
    ```
    Percentage of the requests served within a certain time
    50%      35 ms
    90%      188 ms
    95%      214 ms
    99%      259 ms
    100%      463 ms (longest request)
    ```
    
    After:
    ```
    Percentage of the requests served within a certain time
    50%      8 ms
    90%      33 ms
    95%      39 ms
    99%      48 ms
    100%      66 ms (longest request)
    ```
Commits on Dec 29, 2015
  1. @andreialecu

    chore: update dependencies

    andreialecu committed
  2. @joanrieu @andreialecu

    fix(repl): update outdated property name

    joanrieu committed with andreialecu
    The `resources` command in the REPL didn't work because `r.settings` did not exist and `r.config` should be used instead.
    
    Fixes #680
  3. @joanrieu @andreialecu
Commits on Dec 20, 2015
  1. @kaala @NicolasRitouet

    add class locked to password

    kaala committed with NicolasRitouet
  2. @NicolasRitouet
  3. @andreialecu @NicolasRitouet

    fix(session): memory leak

    andreialecu committed with NicolasRitouet
    Fix some memory leaks
    
    Remove unnecessary code.
Commits on Dec 10, 2015
  1. @yusufiga @andreialecu

    feat(http): allow complex query in _jsonquery parameter

    yusufiga committed with andreialecu
    Allows complex query using `_jsonquery` parameter
    
    example usage
     /todos?_jsonquery={"category": "pets"}
Commits on Dec 9, 2015
  1. @andreialecu @NicolasRitouet

    feat(http): custom CORS request/response headers

    andreialecu committed with NicolasRitouet
    Allow specifying extra headers that should be allowed through CORS:
    
    Example usage:
    
    ```javascript
    var server = deployd({
      port: process.env.PORT || 1337,
      env: 'production',
      origins: [
        "http://localhost:5000",
      ],
      allowedResponseHeaders: ['ETag'],
      allowedRequestHeaders: ['If-None-Match'],
      db: {
        connectionString: process.env.MONGO_URI
      }
    });
    ```
    
    {} -> []
  2. @NicolasRitouet
Commits on Nov 19, 2015
  1. @andreialecu

    Merge pull request #683 from andreialecu/fix-sessiontest2

    andreialecu committed
    fix(test): allow some time for sessions to be cleaned up
  2. @andreialecu
  3. @andreialecu

    Merge pull request #682 from iKristjan/session_fix

    andreialecu committed
    fix(session): use update for updating sessions, not remove and insert
Commits on Nov 17, 2015
  1. @iKristjan
Commits on Oct 30, 2015
  1. @NicolasRitouet

    Fix typo

    NicolasRitouet committed
  2. @NicolasRitouet

    Bump to version 0.8.7

    NicolasRitouet committed
  3. @NicolasRitouet
Commits on Oct 29, 2015
  1. @NicolasRitouet

    Bump to v0.8.6

    NicolasRitouet committed
  2. @nicholasareed @NicolasRitouet

    Fix(User-collection): prevent crash on invalid user for session

    nicholasareed committed with NicolasRitouet
    If a user was deleted manually, a GET for the logged-in user would crash the process. This simple fix puts the hash generation syntax in line with other requests in this file (`null` if !user).
Commits on Oct 21, 2015
  1. @greenkeeperio-bot @NicolasRitouet
  2. @greenkeeperio-bot @NicolasRitouet
  3. @greenkeeperio-bot @NicolasRitouet
  4. @greenkeeperio-bot @NicolasRitouet
  5. @greenkeeperio-bot @NicolasRitouet
  6. @NicolasRitouet @ericfong
Commits on Oct 17, 2015
  1. @NicolasRitouet

    Run tests on node > 4

    NicolasRitouet committed
    Increase timeout for the tests
    
    Cleanup
  2. @docnoe @NicolasRitouet

    Fix: can't rename or delete new,

    docnoe committed with NicolasRitouet
    fixes #629: Property types in dashboard are sortable
    
    Adds class "locked" to list items that should not be sortable.
    
    fixes #633: Users collection not returning errors properly
    
    Returning error unless username is defined.
    
    Could not reproduce most described errors of #633, though.
    
    bugfix: Server crash if password is number
    
    Server was crashing with "TypeError: Not a string or buffer", caused by
    crypto.js.
    
    Fix: If password is a number, convert it to String before creating hash.
    
    Revert "fixes #633: Users collection not returning errors properly"
    
    This reverts commit a7d1c85.
    
    Was accidentaly pushed to PR
    
    Conflicts:
    	lib/resources/user-collection.js
    
    Revert "bugfix: Server crash if password is number"
    
    This reverts commit 99d16ea.
    
    Accidentaly pushed to PR.
    
    Conflicts:
    	lib/resources/user-collection.js
    
    fixes #629: Property types in dashboard are sortable
    
    Adds class "locked" to list items that should not be sortable.
    
    fix(collection): fixes #646, can't rename or delete new, empty collection
    
    adds a check for possible error returned from store.rename() and does
    not not pass it on if it's message is "source namespace does not exist"
    
    minor changes(collection): removes some logging
Commits on Oct 16, 2015
  1. @docnoe @NicolasRitouet

    fix: Server crashes if password is number

    docnoe committed with NicolasRitouet
    fixes #629: Property types in dashboard are sortable
    
    Adds class "locked" to list items that should not be sortable.
    
    fixes #633: Users collection not returning errors properly
    
    Returning error unless username is defined.
    
    Could not reproduce most described errors of #633, though.
    
    bugfix: Server crash if password is number
    
    Server was crashing with "TypeError: Not a string or buffer", caused by
    crypto.js.
    
    Fix: If password is a number, convert it to String before creating hash.
    
    Revert "fixes #633: Users collection not returning errors properly"
    
    This reverts commit a7d1c85.
    
    Was accidentaly pushed to PR
    
    Conflicts:
    	lib/resources/user-collection.js
    
    Revert "bugfix: Server crash if password is number"
    
    This reverts commit 99d16ea.
    
    Accidentaly pushed to PR.
    
    Conflicts:
    	lib/resources/user-collection.js
    
    fixes #629: Property types in dashboard are sortable
    
    Adds class "locked" to list items that should not be sortable.
    
    fix(user-collection): convert password to string if it's a Number
    
    - adds convertion of password to String before creating a password hash,
    so that crypto.js does not crash the application
    
    - changes user-collection unit test to test if app keeps running when
    posting a Number as password
Commits on Aug 22, 2015
  1. @docnoe @ericfong

    fixes #629: Property types in dashboard are sortable

    docnoe committed with ericfong
    Adds class "locked" to list items that should not be sortable.
Commits on Aug 5, 2015
  1. @NicolasRitouet

    Bump to v0.8.5

    NicolasRitouet committed
Something went wrong with that request. Please try again.