rewrite project for NodeJS