I installed Vagrant in windows, now I have a virtual ubuntu , I run a python script :
vagrant@precise32:/vagrant/FlaskMysql/FlaskApp$ ls
app.py static storedPro.txt templates
vagrant@precise32:/vagrant/FlaskMysql/FlaskApp$ python app.py
* Running on http://127.0.0.1:5002/ (Press CTRL+C to quit)
my Vagrantefile :
config.vm.box = "hashicorp/precise32"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.network :forwarded_port, guest: 80, host: 4567
config.vm.network :forwarded_port, guest: 5002, host: 5002
I tried to access the above address from the browser in my window, the index.html page appears in a couple of seconds then disappears.
UPDATE :
vagrant@precise32:/vagrant/FlaskMysql/FlaskApp$ curl http://127.0.0.1:5000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or
there is an error in the application.</p>
Thanks.