Verified Commit 1a5984dd authored by jxtxzzw's avatar jxtxzzw
Browse files

CICD 测试

parent 736fa660
Pipeline #17 failed with stages
in 5 minutes and 29 seconds
const bodyParser = require('body-parser')
const session = require('express-session')
module.exports = {
server: {
host: 'localhost',
port: 43000
},
mode: 'universal',
/*
** Headers of the page
*/
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: [
'view-design/dist/styles/iview.css',
'ant-design-vue/dist/antd.css',
'assets/main.css'
],
/*
** Plugins to load before mounting the App
*/
plugins: [
'@/plugins/view-design',
'@/plugins/antd-ui'
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
'@nuxtjs/eslint-module'
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
// Doc: https://auth.nuxtjs.org/
'@nuxtjs/auth',
['nuxt-matomo', { matomoUrl: '//mgmt.jxtxzzw.com/matomo/', siteId: 5, trackerUrl: '//mgmt.jxtxzzw.com/matomo/matomo.php', scriptUrl: '//mgmt.jxtxzzw.com/matomo/matomo.js' }],
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {
host: 'memory.jxtxzzw.com',
port: 43000,
https: true
},
/*
** Auth module configuration
** See https://auth.nuxtjs.org/
*/
auth: {
cookie: {
options: {
expires: 3
}
},
resetOnError: true,
strategies: {
local: {
endpoints: {
login: { propertyName: 'token.accessToken' }
}
}
// TODO 增加 GitHub 登录
// github: {
// client_id: process.env.GITHUB_CLIENT_ID,
// client_secret: process.env.GITHUB_CLIENT_SECRET
// }
}
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
},
/*
** Add server middleware
** Nuxt.js uses `connect` module as server
** So most of express middleware works with nuxt.js server middleware
*/
serverMiddleware: [
// body-parser middleware
bodyParser.urlencoded({
limit: '5mb',
extended: true
}),
bodyParser.json({
limit: '5mb',
extended: true
}),
// session middleware
session({
secret: 'i9loulu7u_9SveND6tako23NC5',
resave: false,
saveUninitialized: false,
cookie: { maxAge: 60000 }
}),
// Api middleware
'~/api'
]
}
This diff is collapsed.
......@@ -7,6 +7,7 @@
"scripts": {
"dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server",
"build": "nuxt build",
"test": "mocha",
"start": "cross-env NODE_ENV=production node server/index.js",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
......@@ -24,20 +25,25 @@
"@nuxtjs/axios": "^5.9.5",
"@nuxtjs/dotenv": "^1.4.1",
"ant-design-vue": "^1.4.11",
"ava": "^3.8.2",
"body-parser": "^1.19.0",
"cookie-parser": "^1.4.4",
"cross-env": "^5.2.0",
"express": "^4.16.4",
"express-jwt": "^5.3.1",
"express-session": "^1.15.3",
"istanbul": "^0.4.5",
"js-md5": "^0.7.3",
"jsdom": "^16.2.2",
"jsonwebtoken": "^8.5.1",
"mariadb": "^2.2.0",
"mocha": "^7.2.0",
"nodemailer": "^6.4.3",
"nuxt": "^2.11.0",
"nuxt-matomo": "^1.2.3",
"sequelize": "^5.21.5",
"sqlite3": "^4.1.1",
"standard": "^14.3.4",
"view-design": "^4.1.2"
},
"devDependencies": {
......
var assert = require('assert');
describe('SKIP TEST', function() {
it('SKIP TEST', function() {
assert.equal(0, 0);
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment