set up database and initial socket.io