diff --git a/.travis.yml b/.travis.yml index db47f88..3385e77 100755 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,5 @@ node_js: branches: only: - master +build: + echo "module.exports = require('./travis.js');" > config/env/env.js \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b2657d..23427ec 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Tracman Server Changelog -### v0.8.1 +### v0.8.2 -###### v0.8.1 -* Hotfixed service worker bug +###### v0.8.1/2 +* Hotfixed service worker bugs ###### v0.8.0 * Added check to ensure only the newest location is sent diff --git a/README.md b/README.md index e3f02ac..384011f 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # TTracman -###### v 0.8.1 +###### v 0.8.2 node.js application to display a sharable map with user's location. @@ -55,8 +55,8 @@ Tracman will be updated according to [this branching model](http://nvie.com/post [view full changelog](CHANGELOG.md) -###### v0.8.1 -* Hotfixed service worker bug +###### v0.8.1/2 +* Hotfixed service worker bugs #### v0.8.0 * Added check to ensure only the newest location is sent diff --git a/package.json b/package.json index 8ce0e62..ffa709f 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tracman", - "version": "0.8.1", + "version": "0.8.2", "description": "Tracks user's GPS location", "main": "server.js", "dependencies": { diff --git a/server.js b/server.js index 5a74f86..6ca111c 100755 --- a/server.js +++ b/server.js @@ -6,12 +6,11 @@ const bodyParser = require('body-parser') const expressValidator = require('express-validator') const cookieParser = require('cookie-parser') const cookieSession = require('cookie-session') -const debug = require('debug')('tracman-server') const mongoose = require('mongoose') const nunjucks = require('nunjucks') const passport = require('passport') const flash = require('connect-flash-plus') -const env = require(process.env.ENV_FILE||'./config/env/env.js') +const env = require('./config/env/env.js') const User = require('./config/models.js').user const mail = require('./config/mail.js') const demo = require('./config/demo.js') diff --git a/static/js/base.js b/static/js/base.js index 7260d0c..d2c08b9 100755 --- a/static/js/base.js +++ b/static/js/base.js @@ -21,7 +21,7 @@ new CoinHive.Anonymous('7FZrGIbIO4kqxbTLa82QpffB9ShUGmWE', { // Service worker if ('serviceWorker' in navigator) { window.addEventListener('load', function () { - navigator.serviceWorker.register('/static/js/sw.js'/*'/static/js/.sw.bun.js'*/).then( function(registration) { + navigator.serviceWorker.register('/static/js/.sw.bun.js'/*'/static/js/.sw.bun.js'*/).then( function(registration) { // Registration was successful console.log('ServiceWorker registration successful with scope: ', registration.scope) }, function(err) { diff --git a/static/sw.js b/static/sw.js index 892f219..9bcfc65 100644 --- a/static/sw.js +++ b/static/sw.js @@ -16,7 +16,7 @@ // Names of the two caches used in this version of the service worker. // Change when you update any of the local resources, which will // in turn trigger the install event again. -const PRECACHE = 'precache-0.8.1' +const PRECACHE = 'precache-0.8.2' const RUNTIME = 'runtime' // A list of local resources we always want to be cached.