This commit is contained in:
parent
8b68af8a9c
commit
c62771b6c7
|
@ -0,0 +1 @@
|
|||
TARGET='url del servidor local'
|
|
@ -1 +1,2 @@
|
|||
node_modules
|
||||
node_modules
|
||||
.env
|
|
@ -9,6 +9,7 @@
|
|||
"version": "1.0.2",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.3.1",
|
||||
"fastclick": "^1.0.6",
|
||||
"jquery": "^3.7.0"
|
||||
},
|
||||
|
@ -195,6 +196,17 @@
|
|||
"npm": "1.2.8000 || >= 1.4.16"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.3.1",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
|
||||
"integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/motdotla/dotenv?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/ee-first": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
"npm": ">=8"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "^16.3.1",
|
||||
"fastclick": "^1.0.6",
|
||||
"jquery": "^3.7.0"
|
||||
},
|
||||
|
|
5
proxy.js
5
proxy.js
|
@ -1,10 +1,11 @@
|
|||
const express = require('express');
|
||||
const dotenv = require('dotenv');
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
|
||||
const app = express();
|
||||
|
||||
dotenv.config();
|
||||
const apiProxy = createProxyMiddleware('/api', {
|
||||
target: 'http://localhost:3000',
|
||||
target: process.env.TARGET,
|
||||
changeOrigin: true,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue