Fix broken server: define module instead of using require