add variable api
This commit is contained in:
parent
80ce05b35d
commit
0842cfc3d1
@ -3,6 +3,7 @@ const merge = require('webpack-merge')
|
||||
const prodEnv = require('./prod.env')
|
||||
|
||||
module.exports = merge(prodEnv, {
|
||||
NODE_ENV: '"development"'
|
||||
|
||||
NODE_ENV: '"development"',
|
||||
ROOT_API:'"http://localhost:5000"',
|
||||
|
||||
})
|
||||
|
@ -10,13 +10,7 @@ module.exports = {
|
||||
// Paths
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {
|
||||
'/api/v1/chaine': {
|
||||
target: 'http://localhost:5000',
|
||||
changOrigin: true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// Various Dev Server settings
|
||||
host: 'localhost', // can be overwritten by process.env.HOST
|
||||
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
@ -56,12 +50,7 @@ module.exports = {
|
||||
assetsRoot: path.resolve(__dirname, '../../backend/dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/chainetv/',
|
||||
proxyTable: {
|
||||
'/api/v1/chaine': {
|
||||
target: 'chainetv/api/v1/chaine',
|
||||
changOrigin: false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict'
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"'
|
||||
NODE_ENV: '"production"',
|
||||
ROOT_API:'/chainetv'
|
||||
}
|
||||
|
@ -32,7 +32,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getchaine(num) {
|
||||
let path = '/api/v1/chaine/';
|
||||
|
||||
let path = process.env.ROOT_API + '/api/v1/chaine/';
|
||||
path += num;
|
||||
axios.get(path)
|
||||
.then((res) => {
|
||||
@ -49,7 +50,7 @@ export default {
|
||||
|
||||
},
|
||||
parsechaine() {
|
||||
const path = '/api/v1/chaine/';
|
||||
const path = process.env.ROOT_API + '/api/v1/chaine/';
|
||||
axios.put(path)
|
||||
.then((res) => {
|
||||
this.message = res.data;
|
||||
|
Loading…
Reference in New Issue
Block a user