1.0.1 • Published 3 years ago
enapso-proxy v1.0.1
ENAPSO Proxy
The ENAPSO Proxy supports the redirection of requests to other servers.
Configuration
To configure the proxy you use the ENAPSO Config module. Just add an .env file to the ENAPSO\u261aProxy home directory and configure the ENAPSO_CONFIG_FILE
variable to your config file.
Example:
// ENAPSO Proxy Configuration
// (C) Copyright 2020 Innotrade GmbH, Herzogenrath, NRW, Germany
// Author: Alexander Schulze
const { EnapsoDepartmentConfig } = require('./enapso_department_config');
class EnapsoProxyConfig extends EnapsoDepartmentConfig {
constructor(data) {
super(data);
this.application = {
name: 'ENAPSO\u26A1Boost - Proxy',
version: '1.0.0',
copyrightFrom: '2020',
copyrightTo: '2020'
};
this.proxies = [
{
name: 'ENAPSO Backend HTTP Proxy',
target: 'http://localhost:3000',
listen: 3000
}
];
}
}
module.exports = {
EnapsoProxyConfig,
config: EnapsoProxyConfig
};
Run
Just run the proxy with node index.js
or simply enapsoproxy
once you created a link with npm link
.
The console will display:
ENAPSO⚡Boost - Proxy 1.0.0
(C) Copyright 2020 Innotrade GmbH, Herzogenrath, NRW, Germany
Running proxy ENAPSO Backend HTTP Proxy...
Listening on port 3000 to target http://192.168.2.238:3000
1.0.1
3 years ago