[Nodejs/websockets] server.bat equivalent for Mac(solved)

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
direwing
Posts: 4
Joined: Sat Dec 29, 2012 9:40 am

[Nodejs/websockets] server.bat equivalent for Mac(solved)

Post 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
Last edited by direwing on Mon Dec 31, 2012 9:22 am, edited 1 time in total.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: [Nodejs/websockets] server.bat equivalent for Mac

Post 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
The indelible lord of tl;dr
User avatar
direwing
Posts: 4
Joined: Sat Dec 29, 2012 9:40 am

Re: [Nodejs/websockets] server.bat equivalent for Mac

Post by direwing »

Thanks for pointing me in the right direction. That's what I was looking for. :D
Post Reply

Return to “Beginner Help and Support”