add index

Create an index.js and sort out how modules are imported to make it cleaner.

Reference:
https://github.com/praekelt/go-jsbox-location/pull/10/files#r15631300