This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
84 lines (71 loc) · 1.58 KB
/
nuxt.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const bodyParser = require('body-parser');
const session = require('express-session');
const setupFile = require('./modules/setupFile');
const env = setupFile.get('env');
module.exports = {
head: {
title: 'Qtum core',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
{ name: 'mobile-web-app-capable', content: 'yes' },
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black' }
],
link: [
{ rel: 'shortcut icon', href: '/favicon.ico' },
{ rel: 'icon', type: 'image/x-icon', href: '/images/icon-256x256.png' },
{ rel: 'apple-touch-icon', href: '/images/icon-256x256.png' },
{ rel: 'manifest', href: '/manifest.json' },
]
},
css: [
'~assets/scss/app.scss'
],
build: {
extractCSS: true,
},
modules: [
'@nuxtjs/axios',
],
plugins: [
'~/plugins/axios',
'~/plugins/localization',
],
axios: {
baseURL: env.API_URL,
},
env: {
TITLE: env.TITLE || 'Qtum core',
API_URL: env.API_URL || 'http://localhost:3000',
},
loading: {
color: '#2e9ad1',
},
router: {
base: '/',
middleware: ['hook'],
linkActiveClass: 'nuxt-active',
extendRoutes (routes, resolve) {
routes.push(...[
{
name: 'dashboard',
path: '/dashboard',
component: '~/pages/index.vue',
}
]);
}
},
serverMiddleware: [
// body-parser middleware
bodyParser.json(),
// session middleware
session({
secret: 'super-secret-key',
resave: false,
saveUninitialized: false,
cookie: { maxAge: 60000 }
}),
'~/api',
],
};