Socket
Socket
Sign inDemoInstall

feathers-rematch

Package Overview
Dependencies
17
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    feathers-rematch

Models for Feathers services (+ Synced Snapshots, + Authentication)


Version published
Maintainers
1
Install size
2.39 MB
Created

Readme

Source

Feathers Rematch

Integrate Feathers with Rematch

Installation

yarn
yarn add feathers-rematch
npm
npm install feathers-rematch --save

Usage

On server:

app.use('/users', ...);
app.use('/messages', ...);

On client

// services.config.js
const services = [
  {
    name: 'users',
    path: '/users'
  },
  {
    name: 'messages',
    path: '/messages'
  },
];

export default services;
// feathers.config.js
import feathers from '@feathersjs/feathers';
import rest from '@feathersjs/rest-client';
import axios from 'axios';
import { init } from 'feathers-rematch';
import services from './services.config';

const endpoint = 'http://localhost:3030';

const restClient = feathers()
  .configure(rest(endpoint).axios(axios))

const { models } = init({
  transport: 'rest',
  restClient,
  services
});

export { models };
// store.config.js
import { init } from '@rematch/core'
import { models as feathersModels} from './feathers.config';

const store = init({
  models: {
    ...feathersModels
  }
});


store.dispatch.messages.find({ params: {}})
store.dispatch.messages.get({ id: 1, params: {} })
store.dispatch.messages.create({ data: {} })
store.dispatch.messages.put({ params: {} })
store.dispatch.messages.patch({ params: {} })
store.dispatch.messages.remove({ params: {}})

Real-Time

TO DO

Snapshots

TO DO

Contributing

TO DO

  1. Fork it (https://github.com/yourname/yourproject/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

FAQs

Last updated on 04 Oct 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc