Skip to content

0xsam1r/web-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

السلام عليكم ورحمة الله وبركاته 

Lab Solutions Repository

This repository contains my solutions for the lab assignments in the course comp206-webDeveloping- on TypeScript, JavaScript, and Node.js. Each lab focuses on different aspects of these technologies, including frontend development with JavaScript/TypeScript and backend development with Node.js.


Technologies Used

  • Frontend: JavaScript, TypeScript, HTML, CSS
  • Backend: Node.js
  • Tools: npm


Folder Structure

lab-solutions/
├── lab1/              # Lab 1: Basics of TypeScript
├── lab2/              # Lab 2: JavaScript DOM Manipulation
├── lab3/              # Lab 3: Node.js and Express.js Basics
├── lab4/              # Lab 4: Advanced TypeScript Features
└── README.md          # This file

How to Run

  1. Navigate to the specific lab folder:
    cd lab1
  2. Install dependencies:
    npm install
  3. Run the lab solution:
    npm start

Working with TypeScript

To initialize, compile, and run TypeScript code, follow these steps:

1. Initialize a Node.js Project

  • Run the following command to create a package.json file:
    npm init

2. Install TypeScript

  • Install TypeScript as a development dependency:
    npm install typescript --save-dev

3. Initialize TypeScript Configuration

  • Generate a tsconfig.json file:
    npx tsc --init

4. Compile TypeScript to JavaScript

  • Compile a .ts file to .js:
    npx tsc filename.ts
  • Compile all .ts files in the project:
    npx tsc

5. Run the Compiled JavaScript

  • Use Node.js to run the compiled .js file:
    node filename.js

6. Automate Compilation and Execution

  • Install nodemon to run TypeScript files automatic:
    npm install nodemon
  • Run a .ts file without manual compilation:
    npx nodemon filename.ts

Labs Overview

  1. Lab 1: Introduction to TypeScript (basic types, functions, and interfaces).
  2. Lab 2: JavaScript DOM manipulation (event handling, dynamic content).
  3. Lab 3: Node.js and Express.js (building a simple REST API).
  4. Lab 4: Advanced TypeScript (generics, decorators, and type guards).

Contact


Feel free to explore my solutions! 🚀


About

This is my solutions for the lab assignments in the course comp206 @ Faculty of science CS department Ain Shams University

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors