
# sublime-configurator
## Install
```bash

npm install --save sublime-configurator
||
yarn add sublime-configurator

```
## Usage
allReducers.js

```jsx
import { combineReducers } from  'redux';
import  otherReducer  from  '../reducers/myReducer';
// import it from your combine reducers
import { projectReducer } from  'sublime-configurator';

// merge projectReducer with your other reducers
export  default  combineReducers({
	other:  otherReducer,
	project:  projectReducer
});
```
File where you want to use it

```jsx
import  React  from  'react';
// Import it where you want use it and pass your store object
import  Configurator  from  'sublime-configurator';
import  store  from  './store';

export  default  function  App() {
return (
		<Configurator
		  store={store}  // your redux store export
		  tokens={store.getState().auth}  // Auth object
		  uploaderToken={store.getState().user.uploader_token}  // Uploader token
		/>
	);
};
```

## Auth object

Backend is a rails application, it use devise_token_auth for authentification

Auth object need to be structured like this

```json
{
	"client": "",
	"uid": "",
	"access-token": ""
}
```

## Uploader token

Uploader is a node.js application, it use JWT for authentification

```text
"my-uploader-token"
```

## License
MIT © [Eth3rnit3](https://github.com/Eth3rnit3)