courselab / pollex

Open Source Online Poll Application
GNU General Public License v3.0
1 stars 9 forks source link

Is Dockerfile missing to copy something? #19

Closed monacofj closed 4 years ago

monacofj commented 4 years ago

Even merging #18, and being able to build and start the container, I still get 404 for root route. I didn't get used to the workings of the application but I can fix it if one can lend me a hand. Is any files missing in the image? I can happily fix pollex-lfask/Dockerfile if the problem happens to lie in there.

ET33 commented 4 years ago

There is a misunderstand going on. Flask application is not supposed to serve any html files. It'll serve as a RESTful API.

You can test it by sending a POST request to /auth with a body like this: {"username": "foo", "password": "bar"} with Content-Type: application/json

For example:

curl -i -H "Content-TyType: application/json" -X POST -d '{"username": "foo", "password": "bar"}' http://localhost:8080/auth
monacofj commented 4 years ago

I got it. Perhaps the issue description is not clear. I understand that Flask is supporting the RESP API. I mean what is the standard reply to a request like / only, when user is not logged in? A welcome page?

ET33 commented 4 years ago

I believe there won't need to be a / route in Flask for the time beign. Maybe the server time or something like that, but we didn't plan anything for that yet.

monacofj commented 4 years ago

Ok. Closing as it does not make sense.