 
   server.get '/lovely.io/:module.js', (req, res) ->
     module = req.params.module
-    script = "#{base}/#{module}/current/build/#{module}-src.js"
+    script = "#{base}/#{module}/current/build/#{module}#{if minify then '' else '-src'}.js"
 
-    console.log(" Serving:   "+ "'#{module}' module from #{script}".grey)
+    console.log(" Serving:   ".magenta+ "'#{module}' module from #{script}".grey)
 
     fs.readFile script, (err, data)->
       res.contentType('text/javascript')

  server.get '/favicon.ico', (req, res) ->
    res.send '' # just keeping it happy

  # listening all the pages in the user project
  server.get /^\/(.*?)$/, (req, res) ->
    minify = req.query.minify is 'true'
    filename = req.params[0] || 'index'
    filename.substr(filename.length - 5) == '.html' || filename += '.html'

    console.log(" Sending:   "+ "/#{filename}".grey)

    fs.readFile "#{process.cwd()}/#{filename}", (err, data)->
      res.charset = 'utf-8'
      res.contentType('text/html')
      res.send data


  server.listen(port)

  print "Listening at: http://127.0.0.0:#{port}\n"+
    "Press Ctrl+C to hung up\n".grey


exports.help = (args) ->

  server.get '/main.js', (req, res) ->
    src  = if minify then source.minify() else source.compile()
    size = Math.round(src.length/102.4)/10
    console.log(" Compiling: ".cyan+ "/main.js (#{size}Kb #{if minify then 'minified' else 'source'})".grey)
    res.charset = 'utf-8'
    res.header('Cache-Control', 'no-cache')
    res.contentType('text/javascript')
