LU10b - Server-Programing with JavaScript

  1. Programing our first Node Server application „hello world“
  2. Know how to start the server application
  3. Generate a terminal message

At the beginning of each programer's carreer there is always our notorious „Hello World“. Why changing good habits? Let us also greet the world with a first server script.

  1. For that we need to create in our Webstorm a new JavaScript file with the title „helloWorld“. Please note, that the file ending will be set as „js“, if you choose the right file type.
  2. Furthermore we generate a console output with the js command: console.log. The entire line looks then like: console.log('Hello World!');

In the lower part of Webstorm you can open a terminal window to start the mini-server-application. A node server is always started with the commande node + servername.js. In our case it is node helloworld.js, which generates the console output, just as we intended.

English Deutsch
notorious berüchtigt

Volkan Demir

  • modul/m290/learningunits/lu08/theorie/03.txt
  • Zuletzt geändert: 2024/11/18 10:50
  • von cbolzern