Small twisted web server
sudo apt-get install mysql-server python-mysqldb
sudo pip install -r requirements.txt
mysql -u root < init_db.sql (add -p if you have set a password to mysql during installation)
twistd -ny server.tac --logfile=server.log
- set car location
curl --request POST 'http://localhost:8090/car?car_id=42&ll=37.412021,11.896277'
- get car location
curl --request GET 'http://localhost:8090/car?car_id=42'
- subscribe to car location updates
curl --no-buffer --request GET 'http://localhost:8090/subscribe?car_id=42'
- get nearest cars
curl --request GET 'http://localhost:8090/nearest_cars?ll=37.412021,11.896277&count=11'
- simple performance test
tests/make_requests.sh
- simple functional tests
py.test tests/functional.py