Forrest's awesome module

This commit is contained in:
Mark Nadal 2015-01-15 12:17:50 -07:00
parent f79ed457fe
commit fd702221ab
3 changed files with 27 additions and 1 deletions

12
examples/http.js Normal file
View File

@ -0,0 +1,12 @@
var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 80;
var http = require('http');
var Gun = require('gun');
var gun = Gun({
s3: (process.env.NODE_ENV === 'production')? null : require('../test/shotgun') // replace this with your own keys!
});
var server = gun.attach(http.createServer(gun.server)).listen(port);
console.log('Server started on port ' + port + ' with /gun');

View File

@ -1,5 +1,5 @@
{ "name": "gun" { "name": "gun"
, "version": "0.0.9a" , "version": "0.0.9c"
, "author": "Mark Nadal" , "author": "Mark Nadal"
, "description": "Graph engine." , "description": "Graph engine."
, "engines": { , "engines": {

14
web/forrest-notes.txt Normal file
View File

@ -0,0 +1,14 @@
NOTES FROM FORREST:
1 make raw HTTP work and document it, document that attach needs to be BEFORE listen. (talk to AJ)
2 make sure you SUPPRESS your comments, Mark.
3 .get doesn't work on subsequent closures. WHYYY??
4 HOW DO I DELETE? Mark: delete the actual field from the data, but not the stream/meta.
5 security ideas: have gun KEY regexs that are whitelist/blacklist. Off the keys.
6 Forrest says, "arrays".
7 get VAL without gun meta-data.
8 make it work with just Gun('/gun');
gun.js
gun-bundle.js