create network.js
refactor server.js