src/cli/daemon.js
function start() {
  const node = process.execPath
  const daemonFile = path.join(__dirname, '../daemon')
  const startupFile = startup.getFile('hotel')

  startup.create('hotel', node, [daemonFile], common.logFile)

  // Save startup file path in ~/.hotel
  // Will be used later by uninstall script
  mkdirp.sync(common.hotelDir)
  fs.writeFileSync(common.startupFile, startupFile)

  console.log(`Started http://localhost:${conf.port}`)
}
function start() {
  const node = process.execPath
  const daemonFile = path.join(__dirname, '../daemon')
  const startupFile = startup.getFile('hotel')

  startup.create('hotel', node, [daemonFile], common.logFile)

  // Save startup file path in ~/.hotel
  // Will be used later by uninstall script
  mkdirp.sync(common.hotelDir)
  fs.writeFileSync(common.startupFile, startupFile)

  console.log(`Started http://localhost:${conf.port}`)
}
function start ( ) { const node = process . execPath const daemonFile = path . join ( __dirname , '../daemon' ) const startupFile = startup . getFile ( 'hotel' ) startup . create ( 'hotel' , node , [ daemonFile ] , common . logFile ) // Save startup file path in ~/.hotel // Will be used later by uninstall script mkdirp . sync ( common . hotelDir ) fs . writeFileSync ( common . startupFile , startupFile ) console . log ( ` ${ conf . port } ` ) }
Start daemon in background
Start daemon in background