Update index.js
Save connection
Merge branch 'pr/478'
Closes #478