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:
I hereby claim:
To claim this, I am signing this object:
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
machine: | |
pre: | |
- mkdir ~/.yarn-cache | |
node: | |
version: stable | |
dependencies: | |
pre: | |
- curl -o- -L https://yarnpkg.com/install.sh | bash | |
cache_directories: | |
- ~/.yarn-cache |
# 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 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'); |
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'); |
<!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> |
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 |
// 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', { |
This all applies to Ruby 2.1. In some cases a setting is not available in 2.0, this is noted. There is also a different with 1.9, 1.8, and REE --- these are not noted.
All the relevant code is in https://github.com/ruby/ruby/blob/trunk/gc.c
default: 10000
The number of heap slots to start out with. This should be set high enough so that your app has enough or almost enough memory after loading so that it doesn't have to allocate more memory on the first request (althogh this probably isn't such a big deal for most apps).
(todo: figure out how big a slot is. i think the answer can be infered from this code.)