Reuse javascript code from your nodejs server into your browser