21 lines
490 B
TypeScript
21 lines
490 B
TypeScript
import { Router } from "express"
|
|
import { createProxyMiddleware } from "http-proxy-middleware"
|
|
|
|
export const connectionsRoutes = Router()
|
|
|
|
const CONNECTIONSURL = "" // TODO: Meter al ENV
|
|
|
|
connectionsRoutes.post("/sim/activate", createProxyMiddleware({
|
|
target: CONNECTIONSURL + "/sim/activate",
|
|
changeOrigin: true,
|
|
// pathrewrite
|
|
//on proxy req
|
|
}))
|
|
|
|
connectionsRoutes.post("/sim/pause", createProxyMiddleware({
|
|
target: CONNECTIONSURL + "/sim/activate",
|
|
changeOrigin: true
|
|
}))
|
|
|
|
|