Finish updating deps
This commit is contained in:
parent
44860b0dcf
commit
24e42343e4
6 changed files with 103 additions and 65 deletions
11
web/app.js
11
web/app.js
|
@ -3,9 +3,9 @@ import Router from 'koa-router';
|
|||
import csrf from 'koa-csrf';
|
||||
import views from 'koa-views';
|
||||
import stats from 'koa-statsd';
|
||||
import * as redis from '../lib/redis';
|
||||
import StatsD from 'statsy';
|
||||
import errors from 'koa-error';
|
||||
import * as redis from '../lib/redis';
|
||||
import * as index from './routes/index';
|
||||
import * as file from './routes/file';
|
||||
import * as pro from './routes/pro';
|
||||
|
@ -13,7 +13,10 @@ import * as user from './routes/user';
|
|||
|
||||
const router = new Router();
|
||||
|
||||
router.use(errors({template: path.join(__dirname, 'public', 'error.html')}));
|
||||
router.use(errors({
|
||||
engine: 'ejs',
|
||||
template: path.join(__dirname, 'public', 'error.html')
|
||||
}));
|
||||
|
||||
const statsdOpts = {prefix: 'hostr-web', host: process.env.STATSD_HOST};
|
||||
router.use(stats(statsdOpts));
|
||||
|
@ -37,8 +40,8 @@ router.use(function* stateMiddleware(next) {
|
|||
|
||||
router.use(csrf());
|
||||
|
||||
router.use(views('views', {
|
||||
default: 'ejs',
|
||||
router.use(views(path.join(__dirname, 'views'), {
|
||||
extension: 'ejs'
|
||||
}));
|
||||
|
||||
router.get('/', index.main);
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
System.config({
|
||||
baseURL: "/",
|
||||
defaultJSExtensions: true,
|
||||
transpiler: "babel",
|
||||
babelOptions: {
|
||||
"optional": [
|
||||
"runtime"
|
||||
"runtime",
|
||||
"optimisation.modules.system"
|
||||
]
|
||||
},
|
||||
paths: {
|
||||
|
@ -12,62 +14,83 @@ System.config({
|
|||
},
|
||||
|
||||
map: {
|
||||
"angular": "npm:angular@1.4.5",
|
||||
"angular": "npm:angular@1.5.6",
|
||||
"angular-reconnecting-websocket": "github:adieu/angular-reconnecting-websocket@0.1.1",
|
||||
"angular-strap": "npm:angular-strap@2.3.1",
|
||||
"angular/resource": "npm:angular-resource@1.4.5",
|
||||
"angular/route": "npm:angular-route@1.4.5",
|
||||
"babel": "npm:babel-core@5.8.23",
|
||||
"babel-runtime": "npm:babel-runtime@5.8.20",
|
||||
"bootstrap-sass": "npm:bootstrap-sass@3.3.5",
|
||||
"angular/resource": "npm:angular-resource@1.5.6",
|
||||
"angular/route": "npm:angular-route@1.5.6",
|
||||
"angular-strap": "npm:angular-strap@2.3.8",
|
||||
"babel": "npm:babel-core@5.8.38",
|
||||
"babel-runtime": "npm:babel-runtime@5.8.38",
|
||||
"bootstrap-sass": "npm:bootstrap-sass@3.3.6",
|
||||
"cferdinandi/smooth-scroll": "github:cferdinandi/smooth-scroll@5.3.7",
|
||||
"core-js": "npm:core-js@1.1.3",
|
||||
"core-js": "npm:core-js@1.2.6",
|
||||
"dropzone": "npm:dropzone@4.0.1",
|
||||
"jquery": "npm:jquery@2.1.4",
|
||||
"jquery": "npm:jquery@2.2.4",
|
||||
"zeroclipboard": "npm:zeroclipboard@2.2.0",
|
||||
"github:jspm/nodelibs-assert@0.1.0": {
|
||||
"assert": "npm:assert@1.4.1"
|
||||
},
|
||||
"github:jspm/nodelibs-buffer@0.1.0": {
|
||||
"buffer": "npm:buffer@3.4.3"
|
||||
"buffer": "npm:buffer@3.6.0"
|
||||
},
|
||||
"github:jspm/nodelibs-path@0.1.0": {
|
||||
"path-browserify": "npm:path-browserify@0.0.0"
|
||||
},
|
||||
"github:jspm/nodelibs-process@0.1.1": {
|
||||
"process": "npm:process@0.10.1"
|
||||
"github:jspm/nodelibs-process@0.1.2": {
|
||||
"process": "npm:process@0.11.3"
|
||||
},
|
||||
"npm:angular-strap@2.3.1": {
|
||||
"github:jspm/nodelibs-util@0.1.0": {
|
||||
"util": "npm:util@0.10.3"
|
||||
},
|
||||
"npm:angular-strap@2.3.8": {
|
||||
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
|
||||
"child_process": "github:jspm/nodelibs-child_process@0.1.0",
|
||||
"fs": "github:jspm/nodelibs-fs@0.1.2",
|
||||
"path": "github:jspm/nodelibs-path@0.1.0",
|
||||
"process": "github:jspm/nodelibs-process@0.1.1",
|
||||
"systemjs-json": "github:systemjs/plugin-json@0.1.0"
|
||||
"process": "github:jspm/nodelibs-process@0.1.2",
|
||||
"util": "github:jspm/nodelibs-util@0.1.0"
|
||||
},
|
||||
"npm:angular@1.4.5": {
|
||||
"process": "github:jspm/nodelibs-process@0.1.1"
|
||||
"npm:assert@1.4.1": {
|
||||
"assert": "github:jspm/nodelibs-assert@0.1.0",
|
||||
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
|
||||
"process": "github:jspm/nodelibs-process@0.1.2",
|
||||
"util": "npm:util@0.10.3"
|
||||
},
|
||||
"npm:babel-runtime@5.8.20": {
|
||||
"process": "github:jspm/nodelibs-process@0.1.1"
|
||||
"npm:babel-runtime@5.8.38": {
|
||||
"process": "github:jspm/nodelibs-process@0.1.2"
|
||||
},
|
||||
"npm:buffer@3.4.3": {
|
||||
"npm:buffer@3.6.0": {
|
||||
"base64-js": "npm:base64-js@0.0.8",
|
||||
"ieee754": "npm:ieee754@1.1.6",
|
||||
"is-array": "npm:is-array@1.0.1"
|
||||
},
|
||||
"npm:core-js@1.1.3": {
|
||||
"child_process": "github:jspm/nodelibs-child_process@0.1.0",
|
||||
"fs": "github:jspm/nodelibs-fs@0.1.2",
|
||||
"process": "github:jspm/nodelibs-process@0.1.1",
|
||||
"systemjs-json": "github:systemjs/plugin-json@0.1.0"
|
||||
"ieee754": "npm:ieee754@1.1.6",
|
||||
"isarray": "npm:isarray@1.0.0",
|
||||
"process": "github:jspm/nodelibs-process@0.1.2"
|
||||
},
|
||||
"npm:core-js@1.2.6": {
|
||||
"fs": "github:jspm/nodelibs-fs@0.1.2",
|
||||
"path": "github:jspm/nodelibs-path@0.1.0",
|
||||
"process": "github:jspm/nodelibs-process@0.1.2",
|
||||
"systemjs-json": "github:systemjs/plugin-json@0.1.2"
|
||||
},
|
||||
"npm:dropzone@4.0.1": {
|
||||
"process": "github:jspm/nodelibs-process@0.1.1"
|
||||
"process": "github:jspm/nodelibs-process@0.1.2"
|
||||
},
|
||||
"npm:jquery@2.1.4": {
|
||||
"process": "github:jspm/nodelibs-process@0.1.1"
|
||||
"npm:inherits@2.0.1": {
|
||||
"util": "github:jspm/nodelibs-util@0.1.0"
|
||||
},
|
||||
"npm:path-browserify@0.0.0": {
|
||||
"process": "github:jspm/nodelibs-process@0.1.1"
|
||||
"process": "github:jspm/nodelibs-process@0.1.2"
|
||||
},
|
||||
"npm:process@0.11.3": {
|
||||
"assert": "github:jspm/nodelibs-assert@0.1.0"
|
||||
},
|
||||
"npm:util@0.10.3": {
|
||||
"inherits": "npm:inherits@2.0.1",
|
||||
"process": "github:jspm/nodelibs-process@0.1.2"
|
||||
},
|
||||
"npm:zeroclipboard@2.2.0": {
|
||||
"process": "github:jspm/nodelibs-process@0.1.1"
|
||||
"process": "github:jspm/nodelibs-process@0.1.2"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -21,17 +21,17 @@
|
|||
</div>
|
||||
<div class='row vertical-center'>
|
||||
<div class='col-md-12'>
|
||||
<h2>{{ status }}</h2>
|
||||
{% if status >= 500 %}
|
||||
<h1>{{ error }}</h1>
|
||||
<h2><%= status %></h2>
|
||||
<% if (status >= 500) { %>
|
||||
<h1><%= error %></h1>
|
||||
<p>Refreshing might fix the problem. If not, sit tight! We're on it!</p>
|
||||
{% elseif status === 404 %}
|
||||
<% } else if (status === 404) { %>
|
||||
<h1>Sorry, it looks like the file you asked for is gone.</h1>
|
||||
<a href='/'>Take Me Home</a>
|
||||
{% else %}
|
||||
<h1>{{ error }}</h1>
|
||||
<% } else { %>
|
||||
<h1><%= error %></h1>
|
||||
<a href='/'>Take Me Home</a>
|
||||
{% endif %}
|
||||
<% } %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue