Skip to content

Nova Proxy is a Server-Side Include Server to compose a page with micro-frontends views

License

Notifications You must be signed in to change notification settings

ara-framework/nova-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nova Proxy

Hypernova Proxy is an Reverse Proxy whick look in the hosts responses for Hypernova Directives in order to inject the components rendered by Hypernova Server.

Environment Variables

HYPERNOVA_BATCH=http://hypernova:3000/batch
CONFIG_FILE=config.json

Configuration File

Nova Proxy needs a configuration file:

//nova-proxy.json

{
  "locations": [
    {
      "path": "/",
      "host": "http://blog:8000",
      "modifyResponse": true
    }
  ]
}

The locations items require the path and host to let know to Nova Proxy which the application is responsible to serve the requested page. By default the path / passes all the requests to the declared host.

The modifyResponse enable the serve-side includes to that location.

Using Nova Proxy with Ara CLI

Before to run the command we need to set the HYPERNOVA_BATCH variable using the Nova service endpoint.

export HYPERNOVA_BATCH=http://localhost:3000/batch

The command uses a configuration file named nova-proxy.json in the folder where the command is running, otherwise you need to pass the --config parameter with a different path.

ara run:proxy --config ./nova-proxy.json