Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
seripap committed Dec 26, 2016
2 parents dea25fa + 45980f7 commit 77adbce
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 18 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,25 @@ node_js:
cache:
directories:
- node_modules
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- google-chrome-beta
before_install:
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- wget http://chromedriver.storage.googleapis.com/2.24/chromedriver_linux64.zip
- unzip chromedriver_linux64
- sudo mv chromedriver /usr/bin
- sudo mv chromedriver /usr/bin
before_script:
- export CHROME_BIN=/usr/bin/google-chrome
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
- sleep 5 # give xvfb some time to start
- gulp bundle
- npm start &
Expand Down
7 changes: 6 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ module.exports = function(config) {
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],

customLaunchers: {
Chrome_without_sandbox: {
base: 'Chrome',
flags: ['--no-sandbox'] // with sandbox it fails under Docker
}
},
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"scripts": {
"start": "node index.js",
"prod": "forever start -c \"npm start\" ./",
"prod": "npm run bundle && forever start -c \"npm start\" ./",
"dev": "npm run bundle && gulp start",
"bundle": "gulp bundle",
"test": "npm run bundle && gulp test",
Expand Down
24 changes: 11 additions & 13 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
Simple encrypted web chat. Powered by [socket.io](http://socket.io) and the [web cryptography API](https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto).

### Running a local copy
Starting at version **1.5.7**, you can run a local copy of Darkwire via Docker through dockerhub.
You can run a local copy of Darkwire via Docker through dockerhub. Versions are strictly controlled, [we recommend using the latest tagged version](https://github.com/seripap/darkwire.io/releases/latest) as older versions may pose some security issues.

```
$ docker run -d -p 80:3000 --name dakrwire darkwire/1.5.7
# Version numbers can be found in latest releases
$ docker run -d -p 80:3000 --name dakrwire darkwire/${VERSION_NUMBER}
```

Docker is now running on local port 80.
Expand All @@ -23,21 +24,18 @@ $ docker run -p 80:3000 darkwire
Darkwire is now online on local port 80. Default container port is 3000.

### Installation
# Get latest version of NodeJS for ES2015 support
npm install -g n
n stable
npm install
# Using node@v6.7
$ npm install

# Starting dev environment
npm run dev

# Running tests locally
brew install chromedriver
npm test
$ npm run dev

# Running tests locally (Mac)
$ brew install chromedriver
$ npm test
# Start a local instance of darkwire
npm run bundle
npm start
$ npm run bundle
$ npm start

# Changing ports, default is 3000
port=3000 npm start
Expand Down
2 changes: 1 addition & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Room from './room';
let usage = 0;

const $CONFIG = {
port: process.env.port || 3000
port: process.env.port || process.env.PORT || 3000
};

const app = express();
Expand Down
1 change: 1 addition & 0 deletions src/views/index.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Welcome to darkwire.io v{{APP.version}}</h4>
<small>TOR Mirror: <a href="http://darkwirevqhjfmla.onion" target="_blank">http://darkwirevqhjfmla.onion</a></small>
</div>
<div class="modal-body">
<h6>We've placed you in a new chat room</h6>
Expand Down

0 comments on commit 77adbce

Please sign in to comment.