serve js the right way