Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openmct-dev-proxy

Small Express server for local OpenMCT development: it serves a static OpenMCT build and exposes /proxyUrl so the browser stays same-origin (for example http://127.0.0.1:8080) while your backend (FastMIO, Tomcat, and similar) runs on another port.

Requirements

  • Node.js (with npm)
  • A built OpenMCT tree (the directory you set as STATIC_DIR)

Install

cd dev-proxy
npm install

Run

STATIC_DIR is required and must be the directory containing your static OpenMCT files (including index.html).

STATIC_DIR=/path/to/openmct-build/instances/fastmiotesting npm start

Example with a relative path (adjust to your layout):

STATIC_DIR=../../openmct-build/instances/fastmiotesting npm start

Then open http://127.0.0.1:8080/ (or the host/port you set with PORT).

Environment variables

Variable Description
PORT Listen port (default 8080)
STATIC_DIR Required. Directory of the static OpenMCT build
PROXY_ALLOW_ANY Set to 1 or true to allow proxying to non-localhost targets. Development use only; leave unset to restrict to localhost and *.localhost

/proxyUrl

The app forwards requests to the URL in the query string: /proxyUrl?url=<encoded-url>. The HTTP method and body are passed through. Only http: and https: targets are allowed.

By default, the target hostname must be local (localhost, 127.0.0.1, IPv6 loopback, or *.localhost) unless PROXY_ALLOW_ANY is set.

Package

  • Name: openmct-dev-proxy (private; see package.json)
  • Dependencies: express, http-proxy

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages