diff 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
line wrap: on
line diff
--- a/src/app.coffee	Fri Jun 13 16:37:20 2014 +0200
+++ b/src/app.coffee	Fri Jun 13 18:13:36 2014 +0200
@@ -36,9 +36,18 @@
         on address %s port %d', config.address, config.port
 
         # Start Deamon!
-        Sync.sync()
+        # or comment to the next hashtag after ')' and user
+        # Sync.sync()
+        # or start coffee syncALONE.coffee in a different window
+        exec = require("child_process").exec
+        child = undefined
+        child = exec("coffee syncALONE.coffee", (error, stdout, stderr) ->
+          console.log "stdout: " + stdout
+          console.log "stderr: " + stderr
+          console.log "exec error: " + error  if error isnt null
+          return
+        )
+        #
 
-        #app.get '/hello', (req, res) ->
-        # res.send 'Hello, Zaiste!'
       return
 ], (err, result) ->
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)