Yay async

This commit is contained in:
Lance Stout 2014-01-06 20:21:04 -08:00
parent 95e63f14dc
commit e5cbe74069
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "otalk.im",
"version": "0.0.8",
"version": "0.0.9",
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
"repository": {
"type": "git",

View File

@ -50,6 +50,7 @@ if (config.isDev) {
}
clientApp.on('ready', function () {
console.log('READY!');
var pkginfo = JSON.parse(fs.readFileSync('./package.json'));
var manifestTemplate = fs.readFileSync('./clientapp/templates/misc/manifest.cache', 'utf-8');
@ -64,6 +65,9 @@ clientApp.on('ready', function () {
res.set('Cache-Control', 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0');
res.send(cacheManifest);
});
// serves app on every other url
app.get('*', clientApp.html());
});
var webappManifest = fs.readFileSync('./public/x-manifest.webapp');
@ -137,9 +141,6 @@ app.get('/oembed', function (req, res) {
}
});
// serves app on every other url
app.get('*', clientApp.html());
app.use(function handleError(err, req, res, next) {
var errorResult = {message: 'Something bad happened :('};