<file_sep>var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var Map = require('collections/map');
var MultiMap = require('collections/multi-map');
var INT_MAX = 1000000007;

app.use(express.static(__dirname + '/'));
app.use(bodyParser.urlencoded());

app.get('/',function(req,res){
    res.sendfile('graph.html');
});

var server = app.listen(3200, function () {

  var host = server.address().address;
  var port = server.address().port;

  console.log('Example app listening at http://%s:%s', host, port);
});

app.post('/djikstra',function(req,res){
	var info = req.body;
	var vertices = parseInt(info['vertices']);
	var source = parseInt(info['init']);
	var arr = info['vector'];
	var weight = info['weight'];
	var len = info['len'];
	var distance = [];
	for(var i = 1;i<=vertices;i++)
	{
		distance[i] = INT_MAX;
	}
	distance[source] = 0;
	var map = new MultiMap;
	map.set(source,[distance[source]]);
	while(map.length)
	{
		var u = map.sorted()[0][0];
		map.delete(distance.indexOf(u));
		u = distance.indexOf(u);
		--u;
		//strangely, nodejs ignores empty slots in 2D arrays
		for(var v = 0;v<parseInt(len[u+1]);v++)//but retaisn them in 1D array :P
		{
			var dest = parseInt(arr[u][v]);
			if(dest != 0)
			{
				var w = parseInt(weight[u][v]);
				if(distance[dest]>distance[u+1]+w)
				{
					if(distance[v]!=INT_MAX)
					{
						map.delete(dest);
					}
					distance[dest] = distance[u+1]+w;
					map.set(dest,[distance[dest]]);
				}
			}
		}
	}
	res.send(distance);
});<file_sep>This tool requires nodejs to run, nd runs on localhost:3200 for now.
It also requires the following dependencies
1. collectionsjs
2. expressjs
3. body-parser
Kindly npm install them and then run.