Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running UI on localhost #5

Open
GDBSD opened this issue Mar 22, 2019 · 1 comment
Open

Running UI on localhost #5

GDBSD opened this issue Mar 22, 2019 · 1 comment

Comments

@GDBSD
Copy link

GDBSD commented Mar 22, 2019

One of the most obvious omissions in the book and in the code is lack of instructions for deploying the UI on localhost. The Heroku deployment is of limited use, particularly for those of us who want to do a POC for our company. Most companies frown on any code developed on company time being deployed to a public platform. If I was a stronger front-end developer solving this would probably be trivial; but I am not. And I've fussed around trying to get the sample UI running for hours without success. Results:

Command line: INFO __main__ - Action endpoint is up and running. on ('0.0.0.0', 5055)
Browser: http://localhost:5055/health produces {"status":"ok"}
Browser: http://localhost/webhooks/rasa/chat produces:
This site can’t be reached and localhost refused to connect

@sumit12dec
Copy link
Collaborator

@GDBSD I can understand your frustration given you are not much into frontend development.

The reason why it doesn't work on localhost is due to the fact that modern browsers do not allow CORS. https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

I had thought of explaining doing it on localhost only to avoid deployment on Heroku or any other cloud platform but it required another set of workarounds to be done.

Trying installing this chrome extension https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en

and try to access the endpoint on your localhost. This extension is used by frontend developer to skip CORS validation by browsers while development.

Let me know if it works for you.

Regards,
Sumit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants