Skip to content

Wenura17125/IT2234March20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IT2234P Web Services and Server Technologies

JavaScript Node.js Express.js HTTP Code Quality

📚 A comprehensive collection of daily practical lessons for Web Services and Server Technologies course.

📋 Course Overview

This repository serves as a practical guide through various web services and server technologies. Each lesson is organized in dedicated folders containing both source code and visual outputs.

🗓️ Latest Session: Server Technologies (March 20, 2025)

🎯 Learning Objectives

Server Technologies

  • Create basic HTTP server using Node.js
  • Implement Express.js server setup
  • Handle HTTP requests and responses
  • Configure server ports and routing

💻 Code Examples & Implementations

1. Server Technologies

Basic HTTP Server (server.js)
const { createServer } = require('node:http');
const localhost = '127.0.0.1';
const port = 4444;
const server = createServer((req, res) => {
    res.statusCode = 200;
    res.setHeader('Content-Type', 'text/plain');
    res.end('Hello Node JS!');
});

server.listen(port, localhost, () => {
    console.log(`Running on : ${localhost}:${port}`);
});

View Output

Express Server (app.js)
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (req, res) => {
  res.send('Hello Express JS!');
});
app.listen(port, () => {
  console.log(`Example app listening on port ${port}`); 
});

View Output

📊 Implementation Summary

Category File Description Output
Server Technologies server.js Basic HTTP server implementation View
Server Technologies app.js Express.js server implementation View

🔍 Technical Notes

  • All implementations are in pure JavaScript
  • Each example includes comprehensive console output
  • Visual outputs are captured for reference
  • Consistent code formatting and naming conventions

📖 Learning Path | 🛠️ Practical Examples | 📊 Visual Outputs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors