Solution for URL shortening: nginx, postgres, json