- observe file changes
- connect with browser
- send update info to browser when file changes
- fs.watch
- websocket
- TO BE UPDATE
I impl step 3 in a rather stupid way
I connect the server to the ws as well
when file changes, server sends updateInfo to ws, then ws send it to all its connections (including that server)
so you can use id to avoid ws send back info to server, and perhaps observation to files can be directly done in ws.js