implement javascript serving