UNPKG

727 BJavaScriptView Raw
1console.log("If modules not found, run `npm install` in /example folder!"); // git subtree push -P examples heroku master // OR // git subtree split -P examples master && git push heroku [['HASH']]:master --force
2var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8080;
3
4var express = require('express');
5var app = express();
6
7var Gun = require('../');
8var gun = Gun({
9 file: 'data.json',
10 s3: {
11 key: '', // AWS Access Key
12 secret: '', // AWS Secret Token
13 bucket: '' // The bucket you want to save into
14 }
15});
16
17gun.wsp(app);
18app.use(express.static(__dirname)).listen(port);
19
20console.log('Server started on port ' + port + ' with /gun');