Question

Getting started with NodeJS, first Hello World app, prerequisites for app development and api

I am new to NodeJS and I have a droplet edshare.tech

Editing the helpText with the shark gif works but I cannot see a console output.

On Chrome I get: “DevTools failed to load SourceMap: Could not load content for chrome-extension://fehcbmngdgagfalpnfphdhojfdcoblgc/static/js/contentScript.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME”

On Firefox: Error: Can’t find profile directory.

Restarting the hello app with pm2 is fine. I do it with the console of WinSCP


I need some tutorial or example for these very first steps to running a hello world app, adding some code and test it. Could someone help me?


Some more specific questions

  • what is to be done with this 3000 port?
  • I can cd in all directories. But how can I run apps in these directories?
  • How can I use, for instance, index.js instead of hello.js - where is the attribution of apps to paths?
  • Next step after “hello world”: the Airtable API
  • Any configuration required for Nginx
  • Suitable hello world examples on Github?
  • Better alternative to WinSCP (working on Windows)
  • Sometimes the WinSCP console says I need an interactive authorization or sudo. What is the easiest way to use the full range of commands?

Any hint would help! <3


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi there @eckard.ritter,

I believe that a great resource for learning Node.js is this free eBook here:

How To Code in Node.js eBook

Regarding your questions:

  • Port 3000 is the port that the Node.js service is running on, later on you can setup an Nginx reverse proxy and proxy the traffic to port 3000 as explained in this tutorial here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

  • You can start an app from any directory as long as your project is stored in there

  • Here is a link to a Hello World project on GitHub that also uses index.js:

https://github.com/johnpapa/node-hello

  • In case that you get an unauthorized message in WinSCP you need to use the command line and add the sudo keyword in front of your command.

  • Here are a couple of alternative terminals for Windows:

PuTTy Terminus MobaXterm

Hope that this helps. Regards, Bobby

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Thanks so much @bobbyiliev for your extensive and helpful answer. That’s going to save me many hours. Best, Eckard