# vue-sails-promise

> Integration with the Sails framework for Vue.js

Latest version **0.1.22** (published 2018-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-sails-promise
pnpm add vue-sails-promise
yarn add vue-sails-promise
bun add vue-sails-promise
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.22 |
| Published | 2018-07-01 |
| First published | 2018-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Pascal Martineau |
| Maintainers | teddy-error |
| Keywords | vue, sails |

## Links

- npm: https://www.npmjs.com/package/vue-sails-promise
- Repository: https://github.com/teddy-error/vue-sails-promise
- Homepage: https://github.com/teddy-error/vue-sails-promise#readme
- Issues: https://github.com/teddy-error/vue-sails-promise/issues
- npm.io page: https://npm.io/package/vue-sails-promise

## Recent versions

- 0.1.22 (latest) — 2018-07-01
- 0.1.21 — 2018-06-28
- 0.1.2 — 2018-06-28
- 0.1.1 — 2018-06-28

## README

# vue-sails-promise

> [Sails](http://sailsjs.com/) is the most popular MVC framework for Node.js.
> Vue-Sails-Promise is a plugin for Vue.js that integrates it with Sails.

**NOTE:** It's supposed to be compatible both with Vue 1.x and 2.x. It requires IE9+ or Safari 5+

### Install

``` bash
npm install vue-sails-promise
```

### Usage

``` js
// Include and set up Sails client
const socketIOClient = require('socket.io-client');
const sailsIOClient = require('sails.io.js');
const io = sailsIOClient(socketIOClient);

// Additional Sails.io.js configuration
// io.sails.url = 'http://localhost:1337';
// io.sails.environment = process.env.NODE_ENV || 'development';

// Include vue-sails-promise as a CommonJS module
const Vue = require('vue');
const vueSails = require('vue-sails-promise');

// Enable the plugin globally
Vue.use(vueSails, io)
```

Now in every component you get a new property called `$io`, which allows you to interact with the [Sails socket client](http://sailsjs.com/documentation/reference/web-sockets/socket-client):

``` js
this.$io.get(url, data).then(res => ...)
```

### License

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/vue-sails-promise · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
