Add PostsController, api and specs

Also configured the subdomain to work with
api.xxx.com (for example).