add server side code

add server side code