Skip to content
Snippets Groups Projects
nuxt.config.js 3.6 KiB
Newer Older
  • Learn to ignore specific revisions
  • Marc Hanisch's avatar
    Marc Hanisch committed
    /*
    Web client of the Sensor Management System software developed within
    the Helmholtz DataHub Initiative by GFZ and UFZ.
    
    Copyright (C) 2020
    
    - Kotyba Alhaj Taha (UFZ, kotyba.alhaj-taha@ufz.de)
    
    Marc Hanisch's avatar
    Marc Hanisch committed
    - Nils Brinckmann (GFZ, nils.brinckmann@gfz-potsdam.de)
    - Marc Hanisch (GFZ, marc.hanisch@gfz-potsdam.de)
    
    - Tobias Kuhnert (UFZ, tobias.kuhnert@ufz.de)
    
    - Helmholtz Centre for Environmental Research GmbH - UFZ
      (UFZ, https://www.ufz.de)
    
    Marc Hanisch's avatar
    Marc Hanisch committed
    - Helmholtz Centre Potsdam - GFZ German Research Centre for
      Geosciences (GFZ, https://www.gfz-potsdam.de)
    
    Parts of this program were developed within the context of the
    following publicly funded projects or measures:
    - Helmholtz Earth and Environment DataHub
      (https://www.helmholtz.de/en/research/earth_and_environment/initiatives/#h51095)
    
    Licensed under the HEESIL, Version 1.0 or - as soon they will be
    approved by the "Community" - subsequent versions of the HEESIL
    (the "Licence").
    
    You may not use this work except in compliance with the Licence.
    
    You may obtain a copy of the Licence at:
    https://gitext.gfz-potsdam.de/software/heesil
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the Licence is distributed on an "AS IS" basis,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    implied. See the Licence for the specific language governing
    permissions and limitations under the Licence.
    */
    
    
    Marc Hanisch's avatar
    Marc Hanisch committed
    // eslint-disable-next-line
    
    Marc Hanisch's avatar
    Marc Hanisch committed
    import colors from 'vuetify/es5/util/colors'
    
    Nils Brinckmann's avatar
    Nils Brinckmann committed
    import fs from 'fs'
    import path from 'path'
    
    const server = {
      port: 3000,
      host: '0.0.0.0'
    }
    
    if (!process.env.STAY_WITH_HTTP) {
      server.https = {
        key: fs.readFileSync(path.resolve(__dirname, 'server.key')),
        cert: fs.readFileSync(path.resolve(__dirname, 'server.crt'))
      }
    }
    
    
    Marc Hanisch's avatar
    Marc Hanisch committed
    export default {
    
    Marc Hanisch's avatar
    Marc Hanisch committed
      /*
      ** Nuxt target
      ** See https://nuxtjs.org/api/configuration-target
      */
      target: 'server',
    
        smsBackendUrl: process.env.SMS_BACKEND_URL || 'http://localhost:5000/rdm/svm-api/v1',
        cvBackendUrl: process.env.CV_BACKEND_URL || 'http://localhost:5001/api'
    
    Marc Hanisch's avatar
    Marc Hanisch committed
      /*
      ** Headers of the page
      */
      head: {
        titleTemplate: '%s - ' + process.env.npm_package_name,
        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: [
      ],
      /*
      ** Plugins to load before mounting the App
      */
      plugins: [
    
        '~/plugins/api.ts',
        '~/plugins/filters.ts'
    
    Marc Hanisch's avatar
    Marc Hanisch committed
      ],
      /*
      ** Nuxt.js dev-modules
      */
      buildModules: [
        '@nuxt/typescript-build',
        '@nuxtjs/vuetify'
      ],
      /*
      ** Nuxt.js modules
      */
      modules: [
        // Doc: https://axios.nuxtjs.org/usage
        '@nuxtjs/axios',
        '@nuxtjs/pwa',
        // Doc: https://github.com/nuxt-community/dotenv-module
    
    Marc Hanisch's avatar
    Marc Hanisch committed
        '@nuxtjs/dotenv',
        'nuxt-leaflet'
    
    Marc Hanisch's avatar
    Marc Hanisch committed
      ],
      /*
      ** Axios module configuration
      ** See https://axios.nuxtjs.org/options
      */
      axios: {
      },
      /*
      ** vuetify module configuration
      ** https://github.com/nuxt-community/vuetify-module
      */
      vuetify: {
        customVariables: ['~/assets/variables.scss'],
        theme: {
    
    Marc Hanisch's avatar
    Marc Hanisch committed
          dark: false
    
    Marc Hanisch's avatar
    Marc Hanisch committed
        }
      },
      /*
      ** Build configuration
      */
      build: {
        /*
        ** You can extend webpack config here
        */
    
    Marc Hanisch's avatar
    Marc Hanisch committed
        // eslint-disable-next-line
    
    Marc Hanisch's avatar
    Marc Hanisch committed
        extend (config, ctx) {
        }
    
    Tobias Kuhnert's avatar
    Tobias Kuhnert committed
        base: process.env.BASE_URL || '/',
        middleware: 'vuex-oidc-router'
    
    Marc Hanisch's avatar
    Marc Hanisch committed
      }
    }