Page 1 of 1
[Nodejs/websockets] server.bat equivalent for Mac(solved)
Posted: Sat Dec 29, 2012 9:58 am
by direwing
Hello,
Bit of a noob here. I am wondering if there is an equivalent to server.bat for Mac development?
I have nodejs and websockets installed, got HallsNode on my mamp server and was able to run app.js successfully through terminal on my Mac, but it is a huge hassle to navigate there each time.
Thanks in advance. ;P
Re: [Nodejs/websockets] server.bat equivalent for Mac
Posted: Sun Dec 30, 2012 5:25 am
by Jackolantern
Actually, Mac inherits the console commands of Unix, which are much more diverse and powerful than Windows command-line due to Unix long being command-line only and decades old.
Everything in Unix had to be doable from the command-line, since that's all you got. In Windows they are called ".bat" files because that stands for "batch file", but on Mac and in Linux/Unix they are called "shell scripts", and the command-line utility where you type these in is called a "shell" in Unix/Linux/OSX.
I am not completely familiar with how to create executable shell scripts on Mac OSX, but I know they can be created with BBEdit or another basic text editor (the equivalent of Windows' Notepad). Then you would write "shell commands" line after line. Here are some articles that should hopefully have everything you need (if they don't or you need more help, you are now better equipped to search for what you need now that you know what they are called on the platform; also, a Mac user may come in here who can just give you the script, which I bet is pretty short and simple):
How can I run an application with command line arguments in Mac OS
40 Useful Mac OSX Shell Scripts and Commands
Re: [Nodejs/websockets] server.bat equivalent for Mac
Posted: Mon Dec 31, 2012 9:22 am
by direwing
Thanks for pointing me in the right direction. That's what I was looking for.
