https://github.com/chimera-js/vue-chimera
VueJS reactive RESTful API
https://github.com/chimera-js/vue-chimera
reactive rest rest-client restful vue vue-plugin vuejs vuejs2
Last synced: about 1 year ago
JSON representation
VueJS reactive RESTful API
- Host: GitHub
- URL: https://github.com/chimera-js/vue-chimera
- Owner: chimera-js
- License: mit
- Created: 2018-08-02T13:06:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T17:10:26.000Z (over 3 years ago)
- Last Synced: 2025-04-10T01:13:33.025Z (about 1 year ago)
- Topics: reactive, rest, rest-client, restful, vue, vue-plugin, vuejs, vuejs2
- Language: JavaScript
- Homepage: https://vue-chimera.netlify.com/
- Size: 7.12 MB
- Stars: 171
- Watchers: 6
- Forks: 15
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-vue - vue-chimera ★34 - A full-featured RESTful resource based client, compatible with Nuxt.js and allows server side fetch. (Utilities / HTTP Requests)
README
Vue Chimera
[](https://vuejs.org)
[](https://circleci.com/gh/chimera-js/vue-chimera)
[](https://www.npmjs.org/package/vue-chimera)
[](http://npm-stat.com/charts.html?package=vue-chimera)
[](https://bundlephobia.com/result?p=vue-chimera@^3.0.0)
[](https://codecov.io/gh/chimera-js/vue-chimera)
VueJS RESTful client with reactive features.
Vue-Chimera is based on [axios](https://github.com/axios/axios) http client library.
Overview of features:
- Loading flags
- Binding vue instances to API endpoints
- Reactive endpoints and auto request based on vue instance data
- Auto refreshing data
- Serverside prefetching (Nuxt.js compatible)
- Request cancellation
- Cancel all pending requests on vue instance destroy (like route changes)
- Events
- Lightweight
## Demo
[Demo](https://vue-chimera.netlify.com/demo)
## Documents
[Full Documentation](https://vue-chimera.netlify.com)
## Installing
Using npm:
```bash
$ npm install vue-chimera
or
$ yarn add vue-chimera
```
Using cdn:
```html
```
## Getting started
To add **vue-chimera** to your Vue you must use it as a plugin:
*ECMAScript 6*
```javascript
import Vue from 'vue'
import VueChimera from 'vue-chimera'
Vue.use(VueChimera)
```
## Using with Nuxt.js
You can use Vue-Chimera with nuxtjs to use it's SSR features so you can easily prefetch the data.
```javascript
// nuxt.config.js
module.exports = {
modules: [
'vue-chimera/nuxt'
],
chimera: {
// Enables server side prefetch on endpoints which has `auto` property
// true: fetched on server
// false: fetched on client
// 'override': fetched on server and client (overrided by client)
prefetch: true,
prefetchTimeout: 2000 // Server side timeout for prefetch
}
}
```
## Maintainer
## Contribution
All PRs are welcome.
Thanks.
## License
[MIT](https://github.com/chimera-js/vue-chimera/blob/master/LICENSE.MD)