Split app.psgi into frontend and socket part