# 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine: | |
pre: | |
- mkdir ~/.yarn-cache | |
node: | |
version: stable | |
dependencies: | |
pre: | |
- curl -o- -L https://yarnpkg.com/install.sh | bash | |
cache_directories: | |
- ~/.yarn-cache |
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
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:
OlderNewer