[server] Define constants for Javascript as a object.