function main () {
  const testEnviroment = process.env.TEST_ENVIRONMENT || 'LOCAL'
  const channelType = process.env.CHANNEL_TYPE || 'SOCKET'
  const backendPort = process.env.BACKEND_PORT || 9876
  const webserverPort = process.env.WEB_SERVER_PORT || 8000
  const driverDescriptor = process.env.DRIVER_DESCRIPTOR || ''
  const sessionType = process.env.SESSION_TYPE || 'ASYNC'
  const sessionTypeDescriptor = sessionType === 'RX' ? 'rx' : 'async'
  const driverDescriptorList = driverDescriptor
    .split(',').map(s => s.trim().toLowerCase())

  const shouldRunTest = getShouldRunTest([...driverDescriptorList, sessionTypeDescriptor])
  const getFeatures = createGetFeatures([sessionTypeDescriptor], SUPPORTED_TLS)

  configurableConsole.install(process.env.TEST_LOG_LEVEL || 'info')

  const newChannel = () => {
    if (channelType.toUpperCase() === 'WEBSOCKET') {
      const channel = new WebSocketChannel(new URL(`ws://localhost:${backendPort}`))
      remoteConsole.install(channel)
      return channel
    }
    return new SocketChannel(backendPort)
  }

  const newController = () => {
    if (testEnviroment.toUpperCase() === 'REMOTE') {
      return new RemoteController(webserverPort)
    }
    return new LocalController(getRequestHandlers(sessionType), shouldRunTest, getFeatures, neo4j)
  }

  const backend = new Backend(newController, newChannel)

  backend.start()

  if (process.on) {
    // cleaning up
    process.on('exit', backend.stop.bind(backend))

    // Capturing signals
    process.on('SIGINT', process.exit.bind(process))
    process.on('SIGUSR1', process.exit.bind(process))
    process.on('SIGUSR2', process.exit.bind(process))
    process.on('uncaughtException', exception => {
      console.error('UncaughtException', exception)
      process.exit()
    })
  }
}
Responsible for configure and run the backend server.