I hereby claim:
- I am ekryski on github.
- I am ekryski (https://keybase.io/ekryski) on keybase.
- I have a public key ASAF7mDLWRpRkILTq2BjwM_mQd4Ywi0KfZqidQdH0hN90Ao
To claim this, I am signing this object:
machine: | |
pre: | |
- mkdir ~/.yarn-cache | |
node: | |
version: stable | |
dependencies: | |
pre: | |
- curl -o- -L https://yarnpkg.com/install.sh | bash | |
cache_directories: | |
- ~/.yarn-cache |
I hereby claim:
To claim this, I am signing this object:
// You need to set `window.navigator` to something in order to use the socket.io | |
// client. You have to do it like this in order to use the debugger because the | |
// debugger in React Native runs in a webworker and only has a getter method for | |
// `window.navigator`. | |
window.navigator.userAgent = 'ReactNative'; | |
// Need to require instead of import so we can set the user agent first | |
// This must be below your `window.navigator` hack above | |
const io = require('socket.io-client/socket.io'); | |
const socket = io('http://chat.feathersjs.com', { |
require.config({ | |
shim: { | |
'underscore': { | |
exports: '_' | |
}, | |
'less': { | |
exports: 'LESS' | |
} | |
'mocha': { | |
exports: 'mocha' |
We have introduced 3 new hooks and 2 new middleware as part of feathers-permissions that give you much more flexibility and control over access permissions than was previously possible. Permissions are stored in the database on the entity record that needs to have access permissions checked (typically a user). They look like this:
[
'*', // all services, all methods, all docs
'users:*', // all methods on users service
'users:remove:*', // can remove any user
'*:remove', // can remove on any service
const feathers = require('feathers'); | |
const rest = require('feathers-rest'); | |
const socketio = require('feathers-socketio'); | |
const hooks = require('feathers-hooks'); | |
const memory = require('feathers-memory'); | |
const authentication = require('feathers-authentication'); | |
const local = require('feathers-authentication-local'); | |
const jwt = require('feathers-authentication-jwt'); | |
const bodyParser = require('body-parser'); | |
const handler = require('feathers-errors/handler'); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Feathers Example</title> | |
</head> | |
<body> | |
<h1>Welcome to Feathers</h1> | |
<p>Open up the console in your browser.</p> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/core-js/2.1.4/core.min.js"></script> |
import { AsyncStorage } from 'react-native'; | |
import feathers from 'feathers/client' | |
import hooks from 'feathers-hooks'; | |
import socketio from 'feathers-socketio/client' | |
import authentication from 'feathers-authentication-client'; | |
if(!global._babelPolyfill) { require('babel-polyfill'); } | |
// Need to require instead of import so we can set the user agent first | |
const io = require('socket.io-client/socket.io'); |
# Install core dependencies
npm install feathers feathers-hooks
# Install REST and Socket.io
npm install feathers-socketio feathers-rest body-parser
# Install database, error handling, and auth dependencies
npm install feathers-errors feathers-memory feathers-authentication
const host = 'http://localhost:3030'; | |
let socket = io(host, { | |
transport: ['websockets'] | |
}); | |
// Set up Feathers client side | |
let app = feathers(); | |
// Register hooks module | |
app.configure(feathers.hooks()); | |
// Register socket.io |