Move api, make post post work with javascript
Clean server api