Practices on javascript/nodejs