Yes, what you want to do should work fine... And yes, you can still control Espruino over Bluetooth - just make sure that you do use Serial1.setConsole beforehand.
But actually I just saw something: in your code example you write Serial1.on('data', function () { but the function actually needs the data argument to be passed in... Try: Serial1.on('data', function (data) {
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, what you want to do should work fine... And yes, you can still control Espruino over Bluetooth - just make sure that you do use Serial1.setConsole beforehand.
But actually I just saw something: in your code example you write
Serial1.on('data', function () {
but the function actually needs the data argument to be passed in... Try:Serial1.on('data', function (data) {