   key: fs.readFileSync 'ssl/key.pem'
   cert: fs.readFileSync 'ssl/cert.pem'
 server = https.createServer(httpsOptions, app).listen (httpsPort = 8443),
-  -> log "HTTPS server listening on :#{httpsPort}"
+  -> log "https server listening on :#{httpsPort}"
 
 client = net.connect {host: '127.0.0.1', port: 4502}, -> log 'interpreter connected'
 

    f1 = "cache/#{f.replace /\//g, '_'}.uglified"
    if !fs.existsSync(f1) || fs.statSync(f1).mtime < fs.statSync(f).mtime
      if !fs.existsSync 'cache' then fs.mkdirSync 'cache'
      s = fs.readFileSync f, 'utf8'
      if /\.coffee$/.test f then log "compiling #{f}"; s = coffee.compile s, bare: 1
      if !/\.min\.js$/.test f
        log "minifying #{f}"
        s1 = uglify.minify(
          s.replace(/^(?:.*require.*;\n)*/, '')
          fromString: true, mangle: true
        ).code
        try fs.writeFileSync f1, s1 catch # ignore errors
        log "  #{s.length} -> #{s1.length} bytes"
        s = s1
    else
      s = fs.readFileSync f1, 'utf8'
    js += s + '\n'
  log "preloaded js: #{js.length} bytes"
jsFiles.forEach (f) -> fs.watch f, preloadJS

css = ''
do preloadCSS = ->
  log 'minifying CSS...'
  css0 = cssFiles.map((f) -> fs.readFileSync f, 'utf8').join '\n'
  css = cleanCSS.minify css0
  log "  #{css0.length} -> #{css.length} bytes"
  log "preloaded css: #{css.length} bytes"
cssFiles.forEach (f) -> fs.watch f, preloadCSS

ttf = fs.readFileSync 'apl385.ttf'
ico = fs.readFileSync 'favicon.ico'

  n = t = 0
  (s) ->
    if (t1 = +new Date) - t > T then t = t1; n = 1
    if ++n < N then console.info process.uptime().toFixed(3) + ' ' + s
    else if n == N then console.info '... logging temporarily suppressed'

b64 = (s) -> Buffer(s).toString 'base64'
