Server Side code for CD