mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
what about now?
This commit is contained in:
parent
1ab411757f
commit
30963a994d
@ -1 +1 @@
|
||||
admin: node app.js
|
||||
web: node app.js
|
@ -7,8 +7,7 @@ var bodyParser = require('body-parser');
|
||||
var app = express();
|
||||
var Gun = require('gun');
|
||||
var gun = Gun({
|
||||
peers: 'http://localhost:' + port + '/gun'
|
||||
,s3: require('../../test/shotgun') // replace this with your own keys!
|
||||
s3: (process.env.NODE_ENV === 'production')? null : require('../../test/shotgun') // replace this with your own keys!
|
||||
});
|
||||
|
||||
app.use(express.static(__dirname))
|
||||
@ -18,8 +17,8 @@ app.listen(port);
|
||||
|
||||
console.log('Express started on port ' + port + ' with /gun');
|
||||
|
||||
gun.load('blob/data', function(){ // ugh need to initialize the data if there is none, what a waste of LOC!
|
||||
gun.set({_:{'#': "yVbyf7BqlXVQQUOE5cw9rf8h",'>':{hello: 1407328713707,from: 1407328713707}}, // this is a nasty trick to force the ID to overwrite itself
|
||||
gun.load('blob/data').blank(function(){
|
||||
gun.set({
|
||||
hello: "world",
|
||||
from: "Mark Nadal"
|
||||
}).key('blob/data');
|
||||
|
Loading…
x
Reference in New Issue
Block a user