separate server and app code