update JS mock server code