Functional version. Added CRUD and socket.io