0.0.4 • Published 7 years ago

sails-promise v0.0.4

Weekly downloads
1
License
MIT
Repository
bitbucket
Last release
7 years ago

sails-promise

Sails socket communications using promise with bluebird.

Motivation

  • Using sails-socket with mobile apps with react
  • Socket is a lot faster than simple post/get requests
  • Use promisified socket requests to make it easier to manage data from sails
  • Use also a custom authentication mechanism just like firebird and other services but with sails

How do I get set up?

  • Install Install with npm --save install sails-promise

  • Configuration

SailsPromise.config({config object})

Only required parameter is url (for react-native)

  • Dependencies
  • Deployment instructions It is tested on react and react-native applications with Redux.

Only install and import, and configure it.

Example:

import SailsPromise from 'sails-promise';
SailsPromise.config({url: 'http://localhost:1337'});


export function action_fetchSomething() {
  const request = SailsPromise.get('/something',{});
  return {
    type: 'fetch_something',
    payload: request
  };
}

Who do I talk to?

  • Repo owner or admin
0.0.4

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago