Add init function for server