Is it possible to make/use custom text commands in a batch file while running a nodejs server through it?
//Current batch file
node nodeServer.js
//nodeServer.js
function list(){
//insert query
}
function unlist(){
//delete query
}
As of now, after i start the batch file, the nodeServer.js is started and the batch stops accepting any input.
I'd like to be able to type "nodeServer.js list"(in the batch window) and with that, call a function called "list" inside nodeServer.js,
I'm looking to insert data about the server into a database by running a insert query with the "list" function and run a delete query with nodeServer.js unlist to remove the inserted row before shutting down the server again.
I'm unfamiliar with batch files, Is this possible?
Update
To Clarify.. I want to type a text command IN the batch window, AFTER it have started the nodejs server, to run a specific function found inside the nodeServer.js