Update index.js

add `close` method
Update index.js

add auto-restart
Update index.js

add exception handling
add restart_interval to options
update README