This commit is contained in:
Daan Wijns 2019-12-09 14:20:09 +01:00
parent c5f9fa496b
commit f74d378895
7 changed files with 2056 additions and 1962 deletions

View file

@ -35,7 +35,6 @@ Easiest way is with docker-compose:
ports: ports:
- "4000:4000" - "4000:4000"
environment: environment:
- VUE_APP_DOMAIN=http://172.18.0.4:4000
- VUE_APP_WEB_USER=vuetr - VUE_APP_WEB_USER=vuetr
- VUE_APP_WEB_PASS=vuetr - VUE_APP_WEB_PASS=vuetr
- QBIT_USER=qbit - QBIT_USER=qbit

3967
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -9,42 +9,42 @@
"start": "nodemon server/server.js" "start": "nodemon server/server.js"
}, },
"dependencies": { "dependencies": {
"apexcharts": "^3.8.4", "apexcharts": "^3.10.1",
"axios": "^0.18.1", "axios": "^0.18.1",
"cors": "^2.8.5", "cors": "^2.8.5",
"date-fns": "^1.30.1", "date-fns": "^1.30.1",
"dotenv": "^8.0.0", "dotenv": "^8.2.0",
"express": "^4.17.1", "express": "^4.17.1",
"filepond": "^4.4.12", "filepond": "^4.8.0",
"filepond-plugin-file-validate-size": "^2.2.0", "filepond-plugin-file-validate-size": "^2.2.0",
"filepond-plugin-file-validate-type": "^1.2.4", "filepond-plugin-file-validate-type": "^1.2.4",
"filepond-plugin-image-preview": "^4.2.1", "filepond-plugin-image-preview": "^4.5.0",
"multer": "^1.4.2", "multer": "^1.4.2",
"qbittorrent-api": "^1.0.0", "qbittorrent-api": "^1.0.0",
"register-service-worker": "^1.6.2", "register-service-worker": "^1.6.2",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-apexcharts": "^1.4.0", "vue-apexcharts": "^1.5.1",
"vue-filepond": "^5.1.3", "vue-filepond": "^5.1.3",
"vue-router": "^3.1.2", "vue-router": "^3.1.3",
"vuetify": "^1.5.16", "vuetify": "^1.5.21",
"vuex": "^3.1.1" "vuex": "^3.1.2"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^3.10.0", "@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.10.0", "@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-plugin-pwa": "^3.10.0", "@vue/cli-plugin-pwa": "^3.12.1",
"@vue/cli-service": "^3.10.0", "@vue/cli-service": "^3.12.1",
"eslint": "^6.1.0", "eslint": "^6.7.2",
"eslint-config-airbnb-base": "^14.0.0", "eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2", "eslint-plugin-import": "^2.19.1",
"eslint-plugin-vue": "^5.2.3", "eslint-plugin-vue": "^5.2.3",
"stylus": "^0.54.5", "stylus": "^0.54.7",
"stylus-loader": "^3.0.1", "stylus-loader": "^3.0.1",
"vue-cli-plugin-vuetify": "^0.4.6", "vue-cli-plugin-vuetify": "^0.4.6",
"vue-template-compiler": "^2.6.10", "vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.3.0", "vuetify-loader": "^1.4.3",
"webpack": "^4.39.1", "webpack": "^4.41.2",
"webpack-cli": "^3.3.6" "webpack-cli": "^3.3.10"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,

View file

@ -3,7 +3,7 @@ const dotenv = require('dotenv')
const Torrent = require('./models/torrent.class.js') const Torrent = require('./models/torrent.class.js')
const Stat = require('./models/stat.class.js') const Stat = require('./models/stat.class.js')
dotenv.config() dotenv.config({ path: '../.env' })
// server // server
const qbt = api.connect(process.env.QBIT_HOST, process.env.QBIT_USER, process.env.QBIT_PASS) const qbt = api.connect(process.env.QBIT_HOST, process.env.QBIT_USER, process.env.QBIT_PASS)

View file

@ -2,8 +2,12 @@ const express = require('express')
const multer = require('multer') const multer = require('multer')
const fs = require('fs') const fs = require('fs')
const path = require('path') const path = require('path')
const dotenv = require('dotenv')
const qbit = require('./qbit') const qbit = require('./qbit')
dotenv.config({ path: '../.env' })
const PORT = process.env.PORT || 3000 const PORT = process.env.PORT || 3000
const newest_torrent = { const newest_torrent = {
@ -24,6 +28,8 @@ app.use(express.static('dist'))
// requests // requests
// login // login
app.post('/login', (req, res) => { app.post('/login', (req, res) => {
console.log(req.body)
console.log(process.env.VUE_APP_WEB_USE)
if (req.body.username !== process.env.VUE_APP_WEB_USER) { if (req.body.username !== process.env.VUE_APP_WEB_USER) {
return res.send('No such user') return res.send('No such user')
} if ( } if (

View file

@ -3,7 +3,6 @@ const axios = require('axios')
class Qbit { class Qbit {
constructor() { constructor() {
this._axios = axios.create({ this._axios = axios.create({
// baseURL: process.env.VUE_APP_DOMAIN,
timeout: 1000, timeout: 1000,
}) })
} }

5
vue.config.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
devServer: {
proxy: 'http://localhost:3000/',
},
}