Refactor to use express way of routing.