src/start.js
/**
     * Start http server with routes enumerated in .arc (if any)
     */
Start http server with routes enumerated in .arc (if any)
Start http server with routes enumerated in . arc ( if any )
function _http(callback) {
      let ok = () => {
        let end = Date.now()
        console.log()
        update.done(`Sandbox started in ${end - start}ms`)
        if (!quiet) {
          let isWin = process.platform.startsWith('win')
          let ready = isWin
            ? chars.done
            : chalk.green.dim('✈︎')
          let readyMsg = chalk.white('Local environment ready!')
          console.log(`${ready} ${readyMsg}`)
        }
      }
      let arc5 = deprecated && arc.http && arc.http.length
      let arc6 = !deprecated && arc.static || arc.http
      if (arc5 || arc6) {
        http.start(function() {
          ok()
          let link = chalk.green.bold.underline(`http://localhost:${port}\n`)
          console.log(`\n    ${link}`)
          callback()
        })
      }
      else {
        ok()
        callback()
      }
    }
function _http ( callback ) { let ok = ( ) => { let end = Date . now ( ) console . log ( ) update . done ( ` ${ end - start } ` ) if ( ! quiet ) { let isWin = process . platform . startsWith ( 'win' ) let ready = isWin ? chars . done : chalk . green . dim ( '✈︎') let readyMsg = chalk . white ( 'Local environment ready!' ) console . log ( ` ${ ready } ${ readyMsg } ` ) } } let arc5 = deprecated && arc . http && arc . http . length let arc6 = ! deprecated && arc . static || arc . http if ( arc5 || arc6 ) { http . start ( function ( ) { ok ( ) let link = chalk . green . bold . underline ( ` ${ port } \n ` ) console . log ( ` \n ${ link } ` ) callback ( ) } ) } else { ok ( ) callback ( ) } }
Start http server with routes enumerated in .arc (if any)
Start http server with routes enumerated in . arc ( if any )
// Arc 5 only starts if it's got actual routes to load // Arc 6 may start with proxy at root, or empty `@http` pragma