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.
- Frontend: JavaScript, TypeScript, HTML, CSS
- Backend: Node.js
- Tools: npm
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
- Navigate to the specific lab folder:
cd lab1 - Install dependencies:
npm install
- Run the lab solution:
npm start
To initialize, compile, and run TypeScript code, follow these steps:
- Run the following command to create a
package.jsonfile:npm init
- Install TypeScript as a development dependency:
npm install typescript --save-dev
- Generate a
tsconfig.jsonfile:npx tsc --init
- Compile a
.tsfile to.js:npx tsc filename.ts
- Compile all
.tsfiles in the project:npx tsc
- Use Node.js to run the compiled
.jsfile:node filename.js
- Install
nodemonto run TypeScript files automatic:npm install nodemon
- Run a
.tsfile without manual compilation:npx nodemon filename.ts
- Lab 1: Introduction to TypeScript (basic types, functions, and interfaces).
- Lab 2: JavaScript DOM manipulation (event handling, dynamic content).
- Lab 3: Node.js and Express.js (building a simple REST API).
- Lab 4: Advanced TypeScript (generics, decorators, and type guards).
- Name: [Samir Ahmed]
- GitHub: samir176520
- Email: samir176520@gmail.com
Feel free to explore my solutions! 🚀