Mercurial > pumpbridge
comparison src/app.coffee @ 19:6b3f38af3fa4
use child_process for backend
author | Mathias Gebbe <mgebbe@intevation.de> |
---|---|
date | Fri, 13 Jun 2014 18:13:36 +0200 |
parents | 98a070c98982 |
children | dbe2232af20f |
comparison
equal
deleted
inserted
replaced
18:c552faae9c1c | 19:6b3f38af3fa4 |
---|---|
34 else | 34 else |
35 console.log 'Express server is listening | 35 console.log 'Express server is listening |
36 on address %s port %d', config.address, config.port | 36 on address %s port %d', config.address, config.port |
37 | 37 |
38 # Start Deamon! | 38 # Start Deamon! |
39 Sync.sync() | 39 # or comment to the next hashtag after ')' and user |
40 # Sync.sync() | |
41 # or start coffee syncALONE.coffee in a different window | |
42 exec = require("child_process").exec | |
43 child = undefined | |
44 child = exec("coffee syncALONE.coffee", (error, stdout, stderr) -> | |
45 console.log "stdout: " + stdout | |
46 console.log "stderr: " + stderr | |
47 console.log "exec error: " + error if error isnt null | |
48 return | |
49 ) | |
50 # | |
40 | 51 |
41 #app.get '/hello', (req, res) -> | |
42 # res.send 'Hello, Zaiste!' | |
43 return | 52 return |
44 ], (err, result) -> | 53 ], (err, result) -> |