Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Build a Simple Dynamic Site with Node.js Creating a Simple Server in Node.js Creating a Simple Server

ps -aux doesn't show app.js running

I've realised that after spinning the server up via the console you then have to hit the port in the browser for ps -aux to work. Otherwise, nothing happens in the console.

however once I did this, i don't see app.js like on chalkers video

Why is this?

https://w.trhou.se/ctvfnvca0m

2 Answers

Steven Parker
Steven Parker
217,519 Points

Note that the command name will show as "node app.js" (not just "app.js"). in the listing.

But your process may have already ended, either because of an error or if you interrupted it from the keyboard.

I'm having this same issue. The console keeps loading since the program does not have a break and when you type the "ps -aux" it doesn't work in the workspace as shown in the video. The only way the command "ps -aux" worked for me was after it had a proper break when I did "ctrl+c" and then it accepted the "ps -aux" as a command, yet for this case, I understand it wouldn't be needed anymore if so since what we wanted with this command was to find the problem that kept running to stop it.

Steven Parker
Steven Parker
217,519 Points

This technique isn't needed for something running in foreground that will respond to an interrupt (Ctrl-C). You only need to do this for something running in background that you can't stop that way.