#!/usr/bin/env node
/**
 * Start ui server as development
 */
'use strict'

process.env.NODE_ENV = 'development'
process.chdir(`${__dirname}/..`)

const db = require('ore-fol-db').dev()
const loc = require('ore-fol-loc')
const apemanUI = require('apeman-ui')
const create = require('../lib/create')

apemanUI({
  port: 3000,
  configuration: {
    $ui: create({
      db,
      loc,
      proxy: {
        '/api/*': {
          target: {
            host: 'localhost',
            port: 3001
          }
        },
        '/oauth/*': {
          target: {
            host: 'localhost',
            port: 3010
          }
        }
      }
    })
  }
})
