Implemented API server using sokcs instead of WSGIref