Created base server logic.