Membuat Project Express JS

Buka Aplikasi Text Editor (VS Code)

Buka Terminal Pada VS Code dan Cek Versi Node JS

node -v

npm -v

Membuat Fle package.json

npm init -y

Instalasi Express JS

npm install express

Buat File index.js

const express = require('express');
const app = express();
const port = 3000;

// Define routes
app.get('/', (req, res) => {
  res.send('Hello, World!');
});

// Start the server
app.listen(port, () => {
  console.log(`Server is running on http://localhost:${port}`);
});

Menjalankan 

node index.js

Buka Browser

http://localhost:3000