Update api.js

FIx root location, so it will work on windows