-
Notifications
You must be signed in to change notification settings - Fork 21
/
nuxt.config.js
83 lines (82 loc) · 1.65 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
require('dotenv').config()
module.exports = {
mode: 'spa',
/*
** Build
*/
build: {
vendor: ['socket.io-client']
},
/*
** Headers
** Common headers are already provided by @nuxtjs/pwa preset
*/
head: {
title: 'BinBytes - Chat App',
link: [
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Lato:400,700' },
{ rel: 'stylesheet', href: 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#3B8070' },
css: [
'~/assets/css/tailwind.css'
],
/*
** Customize app manifest
*/
manifest: {
theme_color: '#3B8070'
},
/*
** Modules
*/
modules: [
[
'@nuxtjs/pwa', { workbox: false }
],
'@nuxtjs/axios',
'@nuxtjs/auth',
'@nuxtjs/dotenv'
],
/*
** Plugins
*/
plugins: [
'~/plugins/socket.io.js',
'~/plugins/vuebar.js',
'~/plugins/filters.js',
'~/plugins/vueValidate.js'
],
/*
** Auth settings
*/
auth: {
resetOnError: true,
rewriteRedirects: false,
strategies: {
local: {
endpoints: {
login: { url: '/auth/login', method: 'post', propertyName: 'token' },
logout: { url: '/auth/logout', method: 'post' },
user: { url: '/users/me', method: 'get', propertyName: 'user' }
},
tokenRequired: true,
tokenType: '',
}
},
plugins: [ '~/plugins/auth.js' ]
},
/*
** Axios settings
*/
axios: {
baseURL: process.env.API_URL || 'http://localhost:3002/api'
},
env: {
SOCKET_HOST_URL: process.env.SOCKET_HOST_URL || 'http://localhost:3002'
}
}