I'm a student going into back-end development for the first time and are trying to learn Node.JS. I downloaded a pdf book about Node.JS from sitepoint called: Jumpstart Node.JS. In following the instructions to set up the server on the command line, install the dependencies, and navigate to localhost:3000, i got nothing except the following message: Connection refused: localhost:3000, Can somebody please tell me what might have went wrong and how to fix it?
Edit1:
The instructions i followed is about setting up a node.js server using the Node command line, thus no code, simply cmd commands, however, here is a quick summary of the process i followed:
- Created an account on MongoLabs and then a database using the free pricing plan.
- Installed express using the command: npm install -g [email protected].
- Created an applications with default options using this command: express authentication.
- modified the package.json file in system32
- installed the dependencies by typing cd authentication, hitting enter, and then typing the command: npm install
- Typed node app and hit enter.
According to the instructions i should have seen a message: Welcome to express but instead got the error message.