I need to create a bat file to start node server, actually we do it manually but some people need extra help. Let me explain the process:
cd C://user/folder/server/
npm start
It is very simple but I would really like to automate the process to make it faster.
First you must add node.js install folder to path. Last click start.bat Show activity on this post. Just make a bat file in the folder where your program is. Then type this in the bat file: Then, save the bat file and run it.
You can start node.js server as following .bat script file by click on it: Show activity on this post. First you must add node.js install folder to path. Last click start.bat Show activity on this post. Just make a bat file in the folder where your program is. Then type this in the bat file: Then, save the bat file and run it.
You can start node.js server as following .bat script file by click on it: First you must add node.js install folder to path. Just make a bat file in the folder where your program is. Then type this in the bat file: Then, save the bat file and run it.
Double click the batch file to launch Node-Red! 6. If you want the batch file to run every time windows 10 boots copy the batch file or a shortcut to it into C:\Users\ (your user name here)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.
Know this post is old, but just throwing it out there: I just made a super simple .bat-file to start it:
cd C:\nodejs
"C:\MongoDB\bin\mongod.exe" --dbpath C:\MongoDB\bin\data\db
node server.js
Is it just me or is the answer already in plain sight? The following has worked for me perfectly (with OP's path):
cd "C:/user/folder/server"
node index.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With