Created base server class to handle middlewares and panic recovery