novu icon indicating copy to clipboard operation
novu copied to clipboard

🚀 Feature: context path

Open jclab-joseph opened this issue 10 months ago • 2 comments

🔖 Feature description

Make novu web accessible through context path.

Currently, GLOBAL_CONTEXT_PATH exists in the API service, so the API can operate. However, in the case of web, the context path cannot be set before rebuilding. It would be nice to be able to change the context path with an environment variable.

🎤 Why is this feature needed ?

This is required when multi-domain cannot be used.

✌️ How do you aim to achieve this?

Make context-path configurable for all api, web, and ws through the GLOBAL_CONTEXT_PATH environment variable.

🔄️ Additional Information

There is FRONT_BASE_CONTEXT_PATH, but it doesn't seem to be used properly.

👀 Have you spent some time to check if this feature request has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

jclab-joseph avatar Oct 06 '23 07:10 jclab-joseph

I want to work on this.

parag477 avatar Oct 08 '23 16:10 parag477

@parag477

https://docs.novu.co/community/run-in-local-machine This article will help you run it locally! I also tried to create a PR but gave up. (I don't know how to modify react and http-server to beautifully). But you can do it!

To solve this issue need two things:

  • Make it possible to dynamically convert the baseUrl of React's router (you can probably use the env.js that already exists).
  • Make it possible to set the context path on the http-server when serving files from the built frontend. Also, the addresses of assets referenced in index.html should be dynamically replaced.

(https://github.com/novuhq/novu/blob/next/apps/web/package.json)

jclab-joseph avatar Oct 09 '23 06:10 jclab-joseph