added public/index.html and added todo api logic