NodeJS Hosting Yoxlanisi ucun Test Scripti

Gelin hostinge yukleyerek onun islemesini yoxlamaq ucun sade bir test scripti hazirlayaq.

Iki faylimiz olacaq. Proqram fayli:

app.jsimport express from 'express';

let app = express();

app.get('/', function(req, res) {
  res.send('it works');
});

app.listen(3000, function() {
  console.log('running');
});

Ve package.json fayli:

package.json{
  "type": "module",
  "dependencies": {
    "express": "^4.18.2"
  }
}
Задание 1

Test scripti ucun fayllari hazirlayin. Onun islemesini lokalda test edin.