API rewritten in NodeJS