archive 삭제
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
```bash
|
||||
npm install express
|
||||
npm isntall http-proxy-middleware
|
||||
```
|
||||
|
||||
``` js
|
||||
const express = require('express');
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
|
||||
const app = express();
|
||||
const PORT = 9005;
|
||||
|
||||
// "/api"로 시작하는 모든 요청을 다른 서버로 포워딩합니다.
|
||||
app.use('*', createProxyMiddleware({ target: 'http://192.168.101.67:8080', changeOrigin: true }));
|
||||
|
||||
// 서버 시작
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server is running on port ${PORT}`);
|
||||
});
|
||||
```
|
||||
@@ -1 +0,0 @@
|
||||

|
||||
@@ -1,18 +0,0 @@
|
||||
MMC 서버가 구축되어 있는 192.168.101.67 서버는 내부망 서버이기 때문에
|
||||
외부에서 접속을 할 수가 없다.
|
||||
|
||||
데모용으로 외부에서 접근 가능한 IP:Port를 받는다 쳐도
|
||||
이 외부 서버에 MMC 환경이 셋업되어야 사용이 가능한 상황이었다.
|
||||
|
||||
MMC 환경 셋팅을 새롭게 할 순 없었다. (귀찮고.. 시간도 걸리고..)
|
||||
|
||||
하여 외부 서버에 프록시 서버 역할을 하는 환경을 셋업하기로 결정하였음.
|
||||
[[Proxy Server]]
|
||||
|
||||
외부망 (Internet) --> Open IP: Port --> Proxy Server --> 내부망 MMC 서버
|
||||
|
||||
이런 경우를 Reverse Proxy라고 한단다..
|
||||
아닌가? 정확히 이해가 안가네
|
||||
|
||||
테스트로 나는 NodeJS의 Express Server 모듈을 사용해서 Proxy Server를 구축했다.
|
||||
( 근데 Nginx 라는게 우리회사 스탠다드라네?? )
|
||||
Reference in New Issue
Block a user