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

Convert to Flask #13

Open
kramachandran opened this issue Sep 22, 2016 · 5 comments
Open

Convert to Flask #13

kramachandran opened this issue Sep 22, 2016 · 5 comments
Milestone

Comments

@kramachandran
Copy link
Contributor

kramachandran commented Sep 22, 2016

@danhammer - Happy to tackle this or you can. I will have time this weekend (saturday/sunday)

@kramachandran kramachandran added this to the platform milestone Sep 22, 2016
@danhammer
Copy link
Contributor

danhammer commented Sep 22, 2016

If I can't devote time before the weekend, then please feel free -- maybe as part of the docker factor/refactor. I am more than happy to help and document if I am unable to start tackling this issue before you have a chance. I will post to this thread just before I start (if I start before I hear back from you).

@danhammer
Copy link
Contributor

@kramachandran I've started this process with a working version of the flask/docker stack on the branch feature/flask-refactor. I am going to combine the two issues (#13 and #12) into one, which can be closed when we merge the forthcoming pull request.

@danhammer
Copy link
Contributor

danhammer commented Sep 28, 2016

You can run this stuff with the following commands:

docker-compose build
docker-compose up
docker-machine ip default

Navigate to the IP address in the returned result (which for me is 192.168.99.101) and the port 5000. For example http://192.168.99.101:5000.

@danhammer
Copy link
Contributor

Ensuring that this feature doesn't fall off the radar.

self.response.headers.add_header("Access-Control-Allow-Origin", "*")
self.response.headers['Content-Type'] = 'application/json'

I am unsure how to set these headers in the Flask framework. I expect that the solution is in line with Nginx.

@danhammer
Copy link
Contributor

I don't sufficiently understand this post, although it seems relevant. Maybe not now -- premature optimization and complexity -- but I like the idea of adding seemingly extra features to this web service up front, given the plans to make it broader.

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