Node.js folder is m.i.a

0

I'm trying to use node.js in atom, but I can't seem to find the nodejs folder even though I've downloaded node.js. I can find a node executable but no folder to start a project with. I've shown hidden files, and relaunched finder, and still no luck.Can anyone advise me on what to do?

tortoisecode

Posted 2019-02-01T21:50:26.417

Reputation: 1

1what are you trying to do? Your question is a bit unclear. If you want to run a project with Node, you have to create the project or folder naming it whatever you want and then you run the node command to start that specific .js file – Mike Diglio – 2019-02-01T21:55:34.577

@MikeDiglio Sorry about that I'm pretty new to programming and don't have a complete grasp on anything really. But do I just make a folder and name it "anything.js" and then run the node command in terminal? Im on a mac. Also whats the full node command? Thanks homie – tortoisecode – 2019-02-01T22:13:38.650

The folder you make would be the name of your project "MyProject" or whatever you want. Inside that folder, you would need to make an app.js file and then configure it to start. You would then run, from terminal, node app.js - I suggest checking this link out for how to get started - https://nodejs.org/en/docs/guides/getting-started-guide/

– Mike Diglio – 2019-02-01T22:21:18.930

Ok how do I make the file? I understand the rest I think. – tortoisecode – 2019-02-01T22:23:13.660

you can do it directly in atom, or by using terminal touch app.js - this will create the app.js file at current working directory – Mike Diglio – 2019-02-01T22:26:22.107

Ok I got everything working except when I go to localhost it says it couldn't be reached. Terminal didn't give an error or anything when I ran it – tortoisecode – 2019-02-01T22:31:13.997

No answers