Skip to content

Commit

Permalink
Merge pull request #27 from lexich/new
Browse files Browse the repository at this point in the history
Version 0.7.0
  • Loading branch information
lexich committed Dec 8, 2015
2 parents 7cd30a5 + 95206dc commit 9ef50ef
Show file tree
Hide file tree
Showing 12 changed files with 4,911 additions and 4,314 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
@@ -1,6 +1,7 @@
language: node_js
node_js:
- '0.12'
- '4.0.0'
- '4'
- '5'
after_script:
- npm run coveralls
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -280,11 +280,12 @@ rest.actions.test.async();

### reduxApi object

####init(adapter, isServer)
####init(adapter, isServer, rootUrl)
- @description: `reduxApi` initializer returns non initialized object. You need to call `init` for initilize it.
- @type: Function
- @param **adapter** - backend adapter. In curent example we use `adaptersFetch` adapter for rest backend using `fetch` API for rest [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch)
- @param **isServer** - redux api is isomorphic compatible see [examples/isomorphic](https://github.com/lexich/redux-api/tree/master/examples/isomorphic) By default `isServer===false` for clien-size mode. If `isServer===true` redux-api works in server-size mode.
- @param **rootUrl** - root url for every endpoint. very usefull for isomorphic(universal) app. For clientsize use default rootUrl, and for backend use http://localhost:80 for example. For cliendsize for request `/api/get` will be `/api/get` and for backend will be `http://localhost:80/api/get`.
- @example:

```js
Expand All @@ -294,7 +295,7 @@ import adapterFetch from "redux-api/adapters/fetch";
const rest = reduxApi({
... //config
});
rest.init(adapterFetch(fetch), false);
rest.init(adapterFetch(fetch), false, "http://localhost:3000");
```

#### actions
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "redux-api",
"version": "0.6.10",
"version": "0.7.0",
"main": "dist/redux-api.min.js",
"dependencies": {}
}

0 comments on commit 9ef50ef

Please sign in to comment.