How to rank a feature importance?
There are multiple possibilities. 

The obvious one is to sum weights of all connections from input layer to the first hidden layer per input neuron. The neuron with highest sum of connection weights should be the most important. This has several problems. 


Weights could be negative so you should use absolute value of them.
The weight depend on the scale of the input variable. You should normalize the input for example by subtracting mean and dividing by standard deviation of the input (z-normalization). 


Another possibility is to selectively remove features, retrain the network and observe removal of which features caused the biggest decrease in model accuracy. These are potentially the most important features. 

The problem of this approach is, that it changes the architecture of the network, retrains it and does not report the relevance of features entering the original network. 

You can find an elaborate discussion on the problem here ftp://ftp.sas.com/pub/neural/importance.html

There are multiple other approaches, such as Garson's, using complex functions to correct for some problems. You can find several of them implemented in NeuralNetTools package in R.