adding rails server and implementation of dijsktra's algorithm