Share your code.
Edit a string using $EDITOR from within your node app.
npm install string-editor
var edit = ;// this launches your $EDITOR with a tmp file containing "hello world";
Sometimes it can be useful to set an filename to help your editor to enable highlighting etc.
// we pass app.js as a filename to help with highlighting
app.js will still be a tmp file