refactor server_export
refactor the code style of server_export
fix the undefined error