Update index.js

Added logger to single server function