# SirixDB front-end / first steps

**URL:** <https://sirix.discourse.group/t/sirixdb-front-end-first-steps/51>\
**Category:** Uncategorized\
**Created:** [November 29, 2019, 1:07pm UTC](https://sirix.discourse.group/t/sirixdb-front-end-first-steps/51 "2019-11-29T13:07:28Z")\
**Posts on this page:** 5\
**Page:** 3

<div class="post-metadata">

**Author:** ![johannes](https://yyz2.discourse-cdn.com/free1/user_avatar/sirix.discourse.group/johannes/32/7_2.png) [@johannes](https://sirix.discourse.group/u/johannes)\
**Post date:** [December 1, 2019, 6:25pm UTC](https://sirix.discourse.group/t/sirixdb-front-end-first-steps/51/41 "2019-12-01T18:25:27Z")

</div>

Cool, thanks…

BTW: I’ve also a Slack channel, for faster communication when we’re both on 🙂

[https://sirixdb.slack.com/join/shared\_invite/enQtNjI1Mzg4NTY4ODUzLTE3NmRhMWRiNWEzMjQ0NjAxNTZlODBhMTQzMWM2Nzc5MThkMjlmMzI0ODRlNGE0ZDgxNDcyODhlZDRhYjM2N2U](https://sirixdb.slack.com/join/shared_invite/enQtNjI1Mzg4NTY4ODUzLTE3NmRhMWRiNWEzMjQ0NjAxNTZlODBhMTQzMWM2Nzc5MThkMjlmMzI0ODRlNGE0ZDgxNDcyODhlZDRhYjM2N2U)

However, for today, I think I’ll finish 😉

---

<div class="post-metadata">

**Author:** ![mosheduminer](https://yyz2.discourse-cdn.com/free1/user_avatar/sirix.discourse.group/mosheduminer/32/22_2.png) [@mosheduminer](https://sirix.discourse.group/u/mosheduminer)\
**Post date:** [December 1, 2019, 9:37pm UTC](https://sirix.discourse.group/t/sirixdb-front-end-first-steps/51/42 "2019-12-01T21:37:40Z")

</div>

I think that I should be quite embarrassed, thinking that a pathrewrite was needed to get rid of /api, turns out my configuration had a lot of misconfigurations. But I made the following work:

```auto
import { Agent } from 'https';

export default {
  mode: 'universal',
  /*
   ** Headers of the page
   */
  server: {
    port: 3005, // default: 3000
    host: "0.0.0.0" // default: localhost
  },
  head: {
    title: process.env.npm_package_name || '',
    meta: [
      {
        charset: 'utf-8'
      },
      {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1'
      },
      {
        hid: 'description',
        name: 'description',
        content: process.env.npm_package_description || ''
      }
    ],
    link: [
      {
        rel: 'icon',
        type: 'image/x-icon',
        href: '/favicon.ico'
      }
    ]
  },
  /*
   ** Customize the progress-bar color
   */
  loading: {
    color: '#fff'
  },
  /*
   ** Global CSS
   */
  css: ['element-ui/lib/theme-chalk/index.css'],
  /*
   ** Plugins to load before mounting the App
   */
  plugins: ['@/plugins/element-ui', '@/plugins/dependencyContainer.ts', '@/plugins/axios', '@/plugins/auth'],
  /*
   ** Nuxt.js dev-modules
   */
  buildModules: ['@nuxt/typescript-build'],
  /*
   ** Nuxt.js modules
   */
  modules: ['@nuxtjs/pwa', ['@nuxtjs/axios', { baseURL: 'http://localhost:3005' }], '@nuxtjs/auth', '@nuxtjs/proxy', '@nuxtjs/toast'],
  /*
   ** Build configuration
   */
  build: {
    transpile: [/^element-ui/],
    vendor: ['axios'],
    /*
     ** You can extend webpack config here
     */
    extend: function (config, {isDev, isClient}) {
      config.node = {
        fs: "empty"
      };
    }
  },
  axios: {
    baseURL: 'http://localhost:3005',
    browserBaseURL: 'http://localhost:3005',
    headers: {
      'Access-Control-Allow-Origin': '*',
    },
    proxyHeaders: true,
    proxy: true,
  },
  auth: {
    strategies: {
      keycloak: {
	_scheme: 'oauth2',
	authorization_endpoint: '/sirix/user/authorize',
	userinfo_endpoint: false,
	access_type: 'offline',
	access_token_endpoint: '/sirix/token',
	response_type: 'code',
  token_type: 'Bearer',
  token_key: 'access_token',
  client_id: 'sirix',
  client_secret: '8f12a099-767b-4125-bf54-14cb8a9b9f2f',
  redirect_uri: 'http://localhost:3005/callback',
      },
    },
    redirect: {
      login: '/login',
      callback: '/callback',
      home: '/'
    },
  },
  router: {
    middleware: ['auth']
  },
  proxy: {
    '/sirix': {
      // target: 'https://localhost:9443/',
      target: 'https://192.168.99.101:9443/',
      pathRewrite: {'^/sirix': ''},
      agent: new Agent({ rejectUnauthorized: false })
    }
  }
}

```

All the calls - including the one to the database - work now. Only that there are no databases.

---

<div class="post-metadata">

**Author:** ![johannes](https://yyz2.discourse-cdn.com/free1/user_avatar/sirix.discourse.group/johannes/32/7_2.png) [@johannes](https://sirix.discourse.group/u/johannes)\
**Post date:** [December 1, 2019, 10:39pm UTC](https://sirix.discourse.group/t/sirixdb-front-end-first-steps/51/43 "2019-12-01T22:39:48Z")

</div>

Will try tomorrow evening. So, basically everything is working for you? Okay, no databases there, but if it’s not running into the catch and logging an error, that’s great 🙂

---

<div class="post-metadata">

**Author:** ![mosheduminer](https://yyz2.discourse-cdn.com/free1/user_avatar/sirix.discourse.group/mosheduminer/32/22_2.png) [@mosheduminer](https://sirix.discourse.group/u/mosheduminer)\
**Post date:** [December 1, 2019, 10:41pm UTC](https://sirix.discourse.group/t/sirixdb-front-end-first-steps/51/44 "2019-12-01T22:41:38Z")

</div>

Right, I receive a 200 response to the “/sirix” call, which under the hood calls (by proxy) “/” on the server. I’m quite jubilant.

---

<div class="post-metadata">

**Author:** ![johannes](https://yyz2.discourse-cdn.com/free1/user_avatar/sirix.discourse.group/johannes/32/7_2.png) [@johannes](https://sirix.discourse.group/u/johannes)\
**Post date:** [December 1, 2019, 10:57pm UTC](https://sirix.discourse.group/t/sirixdb-front-end-first-steps/51/45 "2019-12-01T22:57:08Z")

</div>

Hope it’ll work for me, too 😃

[Previous page](https://sirix.discourse.group/t/sirixdb-front-end-first-steps/51.md?page=2)
