mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
d5e712eabd
+ starting download
31 lines
No EOL
633 B
CoffeeScript
31 lines
No EOL
633 B
CoffeeScript
config = require 'server_config'
|
|
|
|
#TODO: Could kill current coco server here.
|
|
|
|
requrie('')
|
|
|
|
npm = require "npm"
|
|
npm.load npm.config, (err) ->
|
|
if err
|
|
console.log "Loading npm failed:",err
|
|
return
|
|
|
|
|
|
npm.commands.install ["ffi"], (er, data) ->
|
|
|
|
|
|
# log the error or data
|
|
npm.on "log", (message) ->
|
|
|
|
# log the progress of the installation
|
|
console.log message
|
|
return
|
|
|
|
|
|
if '--clean' in process.argv
|
|
# TODO: What if mongo is not running?
|
|
require('server\commons\databse').connect()
|
|
mongoose = require 'mongoose'
|
|
mongoose.connection.db.dropDatabase()
|
|
|
|
# TODO: Could advice to start SCOCODE.bat et al. here |