Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Commit 97e1bc7

Browse files
author
devrim
committed
handing it over to bahadir
1 parent 0c8a287 commit 97e1bc7

3 files changed

Lines changed: 29 additions & 2 deletions

File tree

Cakefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,34 @@ mkdirp.sync "./.build/.cache"
7171

7272
compilePistachios = require 'pistachio-compiler'
7373

74+
task 'runAll',(args)->
75+
76+
invoke 'server'
77+
invoke 'social'
78+
invoke 'auth'
79+
80+
81+
task 'server',(args)->
82+
83+
configFile = (args.arguments[1].split("."))[1]
84+
KONFIG = require('koding-config-manager').load("main.#{configFile}")
85+
{webserver} = KONFIG
86+
87+
runServer = (config, port) ->
88+
processes.fork
89+
name : 'server' + port
90+
cmd : __dirname+"/server/index -c #{config} -p #{port}"
91+
restart : yes
92+
restartInterval : 100
93+
94+
95+
if webserver
96+
webPort = webserver.port
97+
webPort = [webPort] unless Array.isArray webPort
98+
webPort.forEach (port) ->
99+
runServer configFile, port
100+
101+
74102
clientFileMiddleware = (options, commandLineOptions, code, callback)->
75103
# console.log 'args', options
76104
# here you can change the content of kd.js before it's written to it's final file.

node_modules_koding/koding-config-manager/config.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Config extends EventEmitter
7878
if err
7979
process.exit()
8080

81-
return configFile
81+
return configFile
8282

8383
module.exports = Config
8484

server/lib/server/index.coffee

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ if cluster.isMaster
1313
cluster.on "exit", (worker, code, signal) ->
1414
cluster.fork()
1515
else
16-
1716
processMonitor = (require 'processes-monitor').start
1817
name : "webServer on port #{webPort}"
1918
stats_id: "webserver." + cluster.worker.id

0 commit comments

Comments
 (0)