Skip to content

Commit

Permalink
optional assets host
Browse files Browse the repository at this point in the history
  • Loading branch information
masylum committed Dec 8, 2011
1 parent 27ca30d commit 12178cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions app.js
Expand Up @@ -97,6 +97,10 @@ http.configure(function () {
http.set('view engine', 'jade');
});

http.helpers({
assets_host: conf.assets_host || ''
});

asereje.config({
active: http.set('env') === 'production' // enable it just for production
, js_globals: [ 'vendor/jquery' // js files that will be present always
Expand Down
10 changes: 5 additions & 5 deletions views/layout.jade
Expand Up @@ -6,19 +6,19 @@ html
title FUCKMAHJONG

- each file in css
link(rel='stylesheet', href="/css/" + file + ".css", type="text/css")
link(rel='stylesheet', href= assets_host + "/css/" + file + ".css", type="text/css")

script(src="/socket.io/socket.io.js")
script
window.location.hash = '';
APP = {};

audio#s_click(preload)
source(src= "/sounds/click.mp3")
source(src= assets_host + "/sounds/click.mp3")
audio#s_gling(preload)
source(src= "/sounds/gling.mp3")
source(src= assets_host + "/sounds/gling.mp3")
audio#s_grunt(preload)
source(src= "/sounds/grunt.mp3")
source(src= assets_host + "/sounds/grunt.mp3")

body
#container.paused
Expand All @@ -28,4 +28,4 @@ html

- if (room)
- each file in js
script(src='/js/' + file + '.js')
script(src= assets_host + '/js/' + file + '.js')

0 comments on commit 12178cb

Please sign in to comment.