Skip to content

Commit e8189b5

Browse files
author
Guillaume Chau
committed
chore: dev api server port
1 parent a786ab1 commit e8189b5

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

packages/@vue/cli-ui/apollo-server/connectors/client-addons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let addons = []
88

99
let baseUrl = process.env.VUE_APP_CLI_UI_URL
1010
if (typeof baseUrl === 'undefined') {
11-
baseUrl = 'http://localhost:4000'
11+
baseUrl = `http://localhost:${process.env.VUE_APP_GRAPHQL_PORT}`
1212
} else {
1313
baseUrl = baseUrl.replace(/ws:\/\/([a-z0-9_-]+:\d+).*/i, 'http://$1')
1414
}

packages/@vue/cli-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "@vue/cli-ui",
33
"version": "3.0.3",
44
"scripts": {
5-
"serve": "cross-env VUE_APP_CLI_UI_URL=ws://localhost:4000/graphql vue-cli-service serve",
5+
"serve": "cross-env VUE_APP_CLI_UI_URL=ws://localhost:4030/graphql VUE_APP_GRAPHQL_PORT=4030 vue-cli-service serve",
66
"build": "vue-cli-service build",
77
"lint": "vue-cli-service lint",
8-
"apollo": "cross-env VUE_APP_CLI_UI_DEV=true VUE_APP_GRAPHQL_PORT=4000 vue-cli-service apollo:watch",
8+
"apollo": "cross-env VUE_APP_CLI_UI_DEV=true VUE_APP_GRAPHQL_PORT=4030 vue-cli-service apollo:watch",
99
"apollo:run": "cross-env VUE_CLI_DEBUG=true VUE_CLI_IPC=vue-cli-dev vue-cli-service apollo:run",
1010
"apollo:run:test": "cross-env VUE_CLI_UI_TEST=true VUE_APP_GRAPHQL_PORT=4040 VUE_APP_CLI_UI_URL=ws://localhost:4040/graphql VUE_CLI_IPC=vue-cli-test vue-cli-service apollo:watch",
1111
"prepublishOnly": "yarn run lint --no-fix && yarn run build",

packages/@vue/cli-ui/src/components/ItemLogo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default {
7777
imageUrl () {
7878
// Fix images in development
7979
if (process.env.VUE_APP_CLI_UI_DEV && this.image.charAt(0) === '/') {
80-
return `http://localhost:4000${this.image}`
80+
return `http://localhost:${process.env.VUE_APP_GRAPHQL_PORT}${this.image}`
8181
}
8282
return this.image
8383
}

packages/@vue/cli-ui/src/components/ProjectNavButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default {
7777
methods: {
7878
imageSrc (url) {
7979
if (process.env.VUE_APP_CLI_UI_DEV && url.charAt(0) === '/') {
80-
return `http://localhost:4000${url}`
80+
return `http://localhost:${process.env.VUE_APP_GRAPHQL_PORT}${url}`
8181
}
8282
return url
8383
}

packages/@vue/cli-ui/src/vue-apollo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Vue.use(VueApollo)
1515

1616
let endpoint = process.env.VUE_APP_CLI_UI_URL
1717
if (typeof endpoint === 'undefined') {
18-
endpoint = 'ws://localhost:4000/graphql'
18+
endpoint = `ws://localhost:${process.env.VUE_APP_GRAPHQL_PORT}/graphql`
1919
} else if (endpoint === '') {
2020
endpoint = window.location.origin.replace('http', 'ws') + '/graphql'
2121
}

0 commit comments

Comments
 (0)