diff --git a/Readme.md b/Readme.md index b9b03d9..b002ed4 100644 --- a/Readme.md +++ b/Readme.md @@ -3,3 +3,5 @@ This is a funny universal scoreboard originally developed for the beerpong tournament at a scoutparty + +This thing is based on Express with handlebars, socketio and some other fun diff --git a/app.js b/app.js index 2acb20e..dc64ee6 100644 --- a/app.js +++ b/app.js @@ -5,8 +5,7 @@ var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); -var routes = require('./routes/index'); -var users = require('./routes/users'); +var routes = require('./routes/routes'); var app = express(); @@ -23,7 +22,6 @@ app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', routes); -app.use('/users', users); // catch 404 and forward to error handler app.use(function(req, res, next) { diff --git a/index.html b/index.html deleted file mode 100644 index 67384df..0000000 --- a/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Spielstand - - - - - diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..94bb46b --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,45 @@ +0 info it worked if it ends with ok +1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] +2 info using npm@4.1.2 +3 info using node@v7.1.0 +4 verbose run-script [ 'prestart', 'start', 'poststart' ] +5 info lifecycle uniScore@1.0.0~prestart: uniScore@1.0.0 +6 silly lifecycle uniScore@1.0.0~prestart: no script for prestart, continuing +7 info lifecycle uniScore@1.0.0~start: uniScore@1.0.0 +8 verbose lifecycle uniScore@1.0.0~start: unsafe-perm in lifecycle true +9 verbose lifecycle uniScore@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/LB/Desktop/z_Projects/uniScore/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/Library/TeX/texbin:/Users/LB/.rvm/bin:/Users/LB/pebble-dev/PebbleSDK-3.6/bin:/usr/local/sbin:/Users/LB/Library/Android/sdk/platform-tools:/Users/LB/.rvm/bin:/Users/LB/pebble-dev/PebbleSDK-3.6/bin:/usr/local/sbin:/Users/LB/Library/Android/sdk/platform-tools:/Users/LB/.meteor +10 verbose lifecycle uniScore@1.0.0~start: CWD: /Users/LB/Desktop/z_Projects/uniScore +11 silly lifecycle uniScore@1.0.0~start: Args: [ '-c', 'node ./bin/www' ] +12 silly lifecycle uniScore@1.0.0~start: Returned: code: 1 signal: null +13 info lifecycle uniScore@1.0.0~start: Failed to exec start script +14 verbose stack Error: uniScore@1.0.0 start: `node ./bin/www` +14 verbose stack Exit status 1 +14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) +14 verbose stack at emitTwo (events.js:106:13) +14 verbose stack at EventEmitter.emit (events.js:191:7) +14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) +14 verbose stack at emitTwo (events.js:106:13) +14 verbose stack at ChildProcess.emit (events.js:191:7) +14 verbose stack at maybeClose (internal/child_process.js:885:16) +14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) +15 verbose pkgid uniScore@1.0.0 +16 verbose cwd /Users/LB/Desktop/z_Projects/uniScore +17 error Darwin 16.4.0 +18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" +19 error node v7.1.0 +20 error npm v4.1.2 +21 error code ELIFECYCLE +22 error uniScore@1.0.0 start: `node ./bin/www` +22 error Exit status 1 +23 error Failed at the uniScore@1.0.0 start script 'node ./bin/www'. +23 error Make sure you have the latest version of node.js and npm installed. +23 error If you do, this is most likely a problem with the uniScore package, +23 error not with npm itself. +23 error Tell the author that this fails on your system: +23 error node ./bin/www +23 error You can get information on how to open an issue for this project with: +23 error npm bugs uniScore +23 error Or if that isn't available, you can get their info via: +23 error npm owner ls uniScore +23 error There is likely additional logging output above. +24 verbose exit [ 1, true ] diff --git a/routes/index.js b/routes/index.js deleted file mode 100644 index ecca96a..0000000 --- a/routes/index.js +++ /dev/null @@ -1,9 +0,0 @@ -var express = require('express'); -var router = express.Router(); - -/* GET home page. */ -router.get('/', function(req, res, next) { - res.render('index', { title: 'Express' }); -}); - -module.exports = router; diff --git a/routes/routes.js b/routes/routes.js new file mode 100644 index 0000000..dc55f94 --- /dev/null +++ b/routes/routes.js @@ -0,0 +1,14 @@ +var express = require('express'); +var router = express.Router(); + +/* GET home page. */ +router.get('/', function(req, res, next) { + res.render('index', { title: 'Muhahaha' }); +}); + +router.get('/admin', function(req, res, next) { + //res.send('respond with a resource'); + res.render('admin', { title: 'Muhahaha ADMIN' }); +}); + +module.exports = router; diff --git a/routes/users.js b/routes/users.js deleted file mode 100644 index 623e430..0000000 --- a/routes/users.js +++ /dev/null @@ -1,9 +0,0 @@ -var express = require('express'); -var router = express.Router(); - -/* GET users listing. */ -router.get('/', function(req, res, next) { - res.send('respond with a resource'); -}); - -module.exports = router; diff --git a/views/admin.hbs b/views/admin.hbs new file mode 100644 index 0000000..317d561 --- /dev/null +++ b/views/admin.hbs @@ -0,0 +1,14 @@ + + + + + Admin Interface + + + + +

{{title}}

+

Welcome to {{title}}

+ + + diff --git a/views/index.hbs b/views/index.hbs index 1f308fd..cbbc59c 100644 --- a/views/index.hbs +++ b/views/index.hbs @@ -1,2 +1,14 @@ -

{{title}}

-

Welcome to {{title}}

+ + + + + Spielstand + + + + +

{{title}}

+

Welcome to {{title}}

+ + + diff --git a/views/layout.hbs b/views/layout.hbs deleted file mode 100644 index 068eb6b..0000000 --- a/views/layout.hbs +++ /dev/null @@ -1,10 +0,0 @@ - - - - {{title}} - - - - {{{body}}} - -