Dies ist eine alte Version des Dokuments!


LU10b - Server-Programming von JavaScript- Under Construction

  1. Programming our first Node Server application „hello world“
  2. Know how to start the server application
  3. Establish a connection to the database by using express middleware

At the beginning of each programmer'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.1730207449.txt.gz
  • Zuletzt geändert: 2024/10/29 14:10
  • von vdemir