diff --git a/examples/admin/Procfile b/examples/admin/Procfile index e257a21a..207d22f8 100644 --- a/examples/admin/Procfile +++ b/examples/admin/Procfile @@ -1 +1 @@ -admin: node app.js \ No newline at end of file +web: node app.js \ No newline at end of file diff --git a/examples/admin/app.js b/examples/admin/app.js index 83f75fd1..4d4e93fb 100644 --- a/examples/admin/app.js +++ b/examples/admin/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');