convert everything to js on npm and auto set header host