diff --git a/Dockerfile b/Dockerfile index c11fc7a3..7eb3a7cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,4 +22,5 @@ RUN apk update && apk upgrade \ && npm install \ && apk del .build-dependencies && rm -rf /var/cache/* /tmp/npm* EXPOSE 8080 +EXPOSE 8765 CMD ["npm","start"] diff --git a/README.md b/README.md index 6e5b1cd0..81bb0b3b 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ Then visit the URL in the output of the 'now --npm' step, in your browser. Pull from the [Docker Hub](https://hub.docker.com/r/gundb/gun/) [](https://microbadger.com/images/gundb/gun). Or: ```bash -docker run -p 8080:8080 gundb/gun +docker run -p 8765:8765 gundb/gun ``` Or build the [Docker](https://docs.docker.com/engine/installation/) image locally: @@ -197,17 +197,17 @@ Or build the [Docker](https://docs.docker.com/engine/installation/) image locall git clone https://github.com/amark/gun.git cd gun docker build -t myrepo/gundb:v1 . -docker run -p 8080:8080 myrepo/gundb:v1 +docker run -p 8765:8765 myrepo/gundb:v1 ``` Or, if you prefer your Docker image with metadata labels (Linux/Mac only): ```bash npm run docker -docker run -p 8080:8080 username/gun:git +docker run -p 8765:8765 username/gun:git ``` -Then visit [http://localhost:8080](http://localhost:8080) in your browser. +Then visit [http://localhost:8765](http://localhost:8765) in your browser. ## License diff --git a/examples/angular/server.js b/examples/angular/server.js index f1d1c55e..f8a1978b 100644 --- a/examples/angular/server.js +++ b/examples/angular/server.js @@ -1,4 +1,4 @@ -var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8080; +var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8765; var host = process.env.OPENSHIFT_NODEJS_HOST || process.env.VCAP_APP_HOST || process.env.HOST || 'localhost'; var express = require('express'); diff --git a/examples/express.js b/examples/express.js index 04225202..81e689c3 100644 --- a/examples/express.js +++ b/examples/express.js @@ -1,5 +1,5 @@ console.log("If module not found, install express globally `npm i express -g`!"); -var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8080; +var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8765; var express = require('express'); var Gun = require('..'); diff --git a/examples/hapi.js b/examples/hapi.js index d40b9af1..a4bcca9e 100644 --- a/examples/hapi.js +++ b/examples/hapi.js @@ -5,7 +5,7 @@ const Inert = require('inert') const Gun = require('..') const server = new Hapi.Server({ - port: 8080, + port: 8765, host: 'localhost', routes: { files: { diff --git a/examples/http-external-ws.js b/examples/http-external-ws.js index f59819e3..c0d909d2 100644 --- a/examples/http-external-ws.js +++ b/examples/http-external-ws.js @@ -1,4 +1,4 @@ -var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8080; +var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8765; var Gun = require('../'); diff --git a/examples/http.js b/examples/http.js index defc3122..c915028a 100644 --- a/examples/http.js +++ b/examples/http.js @@ -1,4 +1,4 @@ -var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8080 || 8765; +var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8765; var Gun = require('../'); diff --git a/examples/install.sh b/examples/install.sh index e38f6e25..f88f0661 100644 --- a/examples/install.sh +++ b/examples/install.sh @@ -24,4 +24,4 @@ npm install gun # to run the gun examples: cd ./node_modules/gun npm install . -sudo /usr/local/bin/node ./examples/http.js 80 # change `80` to `8080` for development purposes. +sudo /usr/local/bin/node ./examples/http.js 80 # change `80` to `8765` for development purposes. diff --git a/examples/react/server.js b/examples/react/server.js index 20f87ad0..60f5ff62 100644 --- a/examples/react/server.js +++ b/examples/react/server.js @@ -1,5 +1,5 @@ console.log("If modules not found, run `npm install` in /example folder!"); -var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8081; +var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8765; var host = process.env.OPENSHIFT_NODEJS_HOST || process.env.VCAP_APP_HOST || process.env.HOST || 'localhost'; var express = require('express'); @@ -15,7 +15,7 @@ var gun = Gun({ }); app.use(Gun.serve); -app.use(proxy(host + ':8080')); +app.use(proxy(host + ':8765')); server.listen(port); console.log('Server started on port ' + port + ' with /gun'); diff --git a/examples/social.html b/examples/social.html index 10b8382a..9ff941d8 100644 --- a/examples/social.html +++ b/examples/social.html @@ -37,8 +37,8 @@ ;(() => { function S(){}; window.S = S; - S.gun = Gun(location.host? location.origin+'/gun' : 'http://localhost:8080/gun'); - //S.gun = Gun('http://localhost:8080/gun'); + S.gun = Gun(location.host? location.origin+'/gun' : 'http://localhost:8765/gun'); + //S.gun = Gun('http://localhost:8765/gun'); //S.gun = Gun(); S.app = S.gun.get('examples/social/1'); S.user = S.gun.user(); diff --git a/examples/vue/index.html b/examples/vue/index.html index 0ef5bb68..c7c51c7b 100644 --- a/examples/vue/index.html +++ b/examples/vue/index.html @@ -103,7 +103,7 @@ /********************** SIMPLE NODE GUN SERVER EXAMPLE FOR BACKEND **********************/ // var http = require('http'), Gun = require('gun'); - // Gun({ web: http.createServer().listen(8080) }); + // Gun({ web: http.createServer().listen(8765) }); /********************** MODIFY WITH OUR OWN SERVER ADDRESS **********************/ // Vue.use(GunData, 'http://REPLACE.WITH.YOUR.GUN.SERVER:SERVERPORT/gun'); diff --git a/lib/tmp.test.sql.js b/lib/tmp.test.sql.js index 1f9058ed..b7d5b664 100644 --- a/lib/tmp.test.sql.js +++ b/lib/tmp.test.sql.js @@ -32,7 +32,7 @@ test._.stack.push(fn); return test; } - var gun = window.gun = Gun(); //Gun('http://localhost:8080/gun'); + var gun = window.gun = Gun(); window.SPAM = function(read){ // TODO: BUG? gun-sid in transport layer not correct? //localStorage.clear(); var start = Gun.time.is(); diff --git a/package.json b/package.json index dea84732..f121ee42 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "browser": "gun.min.js", "scripts": { - "start": "node examples/http.js 8080", + "start": "node examples/http.js 8765", "prepublishOnly": "npm run unbuild", "test": "mocha", "testsea": "mocha test/sea.js", diff --git a/test/debug/deep-set.html b/test/debug/deep-set.html index e0a5dade..35e6ec93 100644 --- a/test/debug/deep-set.html +++ b/test/debug/deep-set.html @@ -3,7 +3,7 @@ ;(function(){ //localStorage.clear(); - var gun = window.gun = Gun('http://localhost:8080/gun'); + var gun = window.gun = Gun('http://localhost:8765/gun'); var user = window.user = gun.get('pub/alice'); return; user.put({pub: 'alice'}, write); diff --git a/test/gun.html b/test/gun.html index 47f6f986..0109c8ee 100644 --- a/test/gun.html +++ b/test/gun.html @@ -1,6 +1,5 @@ - \ No newline at end of file diff --git a/test/https/test.js b/test/https/test.js index de78a980..6eb7bf04 100644 --- a/test/https/test.js +++ b/test/https/test.js @@ -1,5 +1,5 @@ module.exports = function(port, file, cb, inject){ - port = port || process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8080; + port = port || process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8765; var fs = require('fs'); var Gun = require(__dirname+'/../../'); diff --git a/test/panic/b2s2s2b.js b/test/panic/b2s2s2b.js index 03c22fea..631c2f09 100644 --- a/test/panic/b2s2s2b.js +++ b/test/panic/b2s2s2b.js @@ -1,6 +1,6 @@ var config = { IP: require('ip').address(), - port: 8080, + port: 8765, servers: 2, browsers: 2, each: 100000, diff --git a/test/panic/curl-server.js b/test/panic/curl-server.js index 0397b96b..e45051da 100644 --- a/test/panic/curl-server.js +++ b/test/panic/curl-server.js @@ -1,6 +1,6 @@ var config = { IP: require('ip').address(), - port: 8080, + port: 8765, servers: 2, dir: __dirname } diff --git a/test/panic/e2e/distributed.js b/test/panic/e2e/distributed.js index 4005787f..0ec86045 100644 --- a/test/panic/e2e/distributed.js +++ b/test/panic/e2e/distributed.js @@ -22,17 +22,17 @@ describe('PANIC!', function(){ panic.server(server); gun.wsp(server); - server.listen(8080); + server.listen(8765); var clients = panic.clients; var wd = require('selenium-webdriver'); var ff1 = new wd.Builder() .forBrowser('firefox').build() - .get('http://localhost:8080/panic.html'); + .get('http://localhost:8765/panic.html'); var ff2 = new wd.Builder() .forBrowser('firefox').build() - .get('http://localhost:8080/panic.html'); + .get('http://localhost:8765/panic.html'); function min(n, done, list){ list = list || clients; diff --git a/test/panic/e2e/holy/grail.js b/test/panic/e2e/holy/grail.js index eb49f46f..7adac50d 100644 --- a/test/panic/e2e/holy/grail.js +++ b/test/panic/e2e/holy/grail.js @@ -47,7 +47,7 @@ var bob = browsers.excluding(alice).pluck(1); var serverPath = path.join(__dirname, 'gun-server.js'); -// start the server on :8080 +// start the server on :8765 spawn('node', [serverPath]); function waitFor (num, list) { diff --git a/test/panic/e2e/holy/index.html b/test/panic/e2e/holy/index.html index 5a8a87bb..6cf66963 100644 --- a/test/panic/e2e/holy/index.html +++ b/test/panic/e2e/holy/index.html @@ -7,7 +7,7 @@
- + + + + + \ No newline at end of file diff --git a/test/tmp/li.html b/test/tmp/li.html new file mode 100644 index 00000000..df801459 --- /dev/null +++ b/test/tmp/li.html @@ -0,0 +1,142 @@ + + +