From 60ea490d422742588009b1804056b8cdf1625d9e Mon Sep 17 00:00:00 2001 From: Stanislav Popov Date: Thu, 17 Dec 2020 23:27:54 +0500 Subject: [PATCH] feat(scan): SERVER_URL env --- nuxt.config.js | 5 +++-- package.json | 2 +- pages/scan.vue | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index d4d1668..823f8dc 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -26,13 +26,14 @@ module.exports = { }, env: { - itemsJsonUrl: process.env.JSON_URL || 'http://localhost:3001/data.json' + itemsJsonUrl: process.env.JSON_URL || 'http://localhost:3001/data.json', + SERVER_URL: process.env.SERVER_URL }, io: { sockets: [{ name: 'main', - url: 'http://localhost:3001' + url: process.env.SERVER_URL || 'http://localhost:3001' }] }, diff --git a/package.json b/package.json index 73b711d..1d9fd19 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "homepage": "https://github.com/viasite/site-audit-seo-viewer", "private": true, "scripts": { - "dev": "cross-env HOST=0.0.0.0 PORT=3000 nuxt", + "dev": "cross-env SERVER_URL=http://localhost:3001 HOST=0.0.0.0 PORT=3000 nuxt", "build": "nuxt build", "deploy": "bash scripts/deploy.sh", "deploy-dev": "bash data/deploy-dev.sh", diff --git a/pages/scan.vue b/pages/scan.vue index 9eb8298..591ce20 100644 --- a/pages/scan.vue +++ b/pages/scan.vue @@ -48,7 +48,7 @@