Refactor Post create method
Added function to server to respond correctly to Angular html5 mode