finished nice js api, todo: fix server