add isomorphic support
export js to main.js in example