Modified server.py to include 'select module' and added JSON support