separate app and server code