Skip to content

Commit

Permalink
Make it possible to start backend from any path
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Teinum committed Apr 26, 2013
1 parent fc7a24e commit 3bda2eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion backend/main.coffee
@@ -1,4 +1,5 @@
fs = require 'fs'
path = require 'path'
io = require('socket.io').listen(4563)
request = require 'request'
_ = require 'underscore'
Expand Down Expand Up @@ -88,7 +89,7 @@ io.sockets.on 'connection', (socket) ->
if locale isnt 'no' and locale isnt 'en'
return

fs.readFile 'locale/' + locale + '.json', 'utf8', (err, data) ->
fs.readFile path.resolve(__dirname, 'locale/', locale + '.json'), 'utf8', (err, data) ->
if err
throw err

Expand Down
6 changes: 4 additions & 2 deletions backend/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3bda2eb

Please sign in to comment.