Socket
Book a DemoInstallSign in
Socket

feathers-rematch

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feathers-rematch

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

0.1.2
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
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

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

FAQs

Package last updated on 04 Oct 2018

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.