├── .gitignore
├── Kanika
├── .gitignore
├── Kanika-as2.js
├── Kanika-as4.js
├── Kanika.js
├── Kanika8thjul.js
├── kanika-as3.js
└── package.json
├── Mediquity-main.zip
├── PayalDabas
├── .gitignore
├── 5thjuly.js
├── 8thjuly.js
└── file.js
├── README.md
├── Rithik
├── .gitignore
├── index.js
└── package.json
├── chinmay branch
└── chinmay.js
├── example
├── .gitignore
├── Practical1
│ ├── .gitignore
│ ├── app.js
│ ├── package.json
│ ├── public
│ │ └── css
│ │ │ └── style.css
│ └── views
│ │ ├── pages
│ │ └── items.ejs
│ │ └── partials
│ │ └── header.ejs
├── Practical2
│ ├── .gitignore
│ ├── package.json
│ ├── public
│ │ └── css
│ │ │ └── style.css
│ ├── server.js
│ └── views
│ │ ├── pages
│ │ ├── index.ejs
│ │ └── post.ejs
│ │ └── partials
│ │ ├── footer.ejs
│ │ └── header.ejs
└── ninthjuly
│ ├── .gitignore
│ ├── package.json
│ ├── server.js
│ └── views
│ └── index.ejs
└── vinay
├── .gitignore
├── BlogsWeb
├── .gitignore
├── package-lock.json
├── package.json
├── public
│ ├── css
│ │ └── styles.css
│ └── js
│ │ └── scripts.js
├── routes
│ ├── comments.js
│ ├── posts.js
│ └── users.js
├── server.js
└── views
│ ├── layouts
│ └── main.ejs
│ ├── partials
│ ├── body.ejs
│ ├── footer.ejs
│ └── header.ejs
│ ├── posts
│ ├── comments
│ │ ├── edit.ejs
│ │ ├── index.ejs
│ │ └── new.ejs
│ ├── edit.ejs
│ ├── index.ejs
│ ├── new.ejs
│ └── show.ejs
│ └── users
│ ├── edit.ejs
│ ├── index.ejs
│ └── new.ejs
├── CORS2_UseCase
├── .gitignore
├── client
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ └── index.html
│ └── src
│ │ ├── App.js
│ │ └── index.js
├── package-lock.json
├── readme.md
└── server
│ ├── models
│ └── Task.js
│ ├── package-lock.json
│ ├── package.json
│ ├── routes
│ └── tasks.js
│ └── server.js
├── CORS_UseCase
├── index.html
├── package-lock.json
├── package.json
└── server.js
├── ExpressRoute
├── .gitignore
├── package.json
├── routes
│ ├── posts.js
│ └── users.js
└── server.js
├── GET_POST2
├── .gitignore
├── package.json
├── server.js
└── views
│ └── index.ejs
├── GET_POST3
├── .gitignore
├── package.json
├── server.js
└── views
│ └── index.ejs
├── Practice
├── .gitignore
├── package.json
└── server.js
├── Quora
├── .gitignore
├── index.js
├── package.json
├── public
│ └── style.css
└── views
│ ├── edit.ejs
│ ├── index.ejs
│ ├── new.ejs
│ └── show.ejs
├── Test
└── readme.md
├── authInMern
├── client
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ └── src
│ │ ├── App.js
│ │ ├── components
│ │ ├── Login
│ │ │ ├── index.jsx
│ │ │ └── styles.module.css
│ │ ├── Main
│ │ │ ├── index.jsx
│ │ │ └── styles.module.css
│ │ └── Singup
│ │ │ ├── index.jsx
│ │ │ └── styles.module.css
│ │ ├── index.css
│ │ └── index.js
└── server
│ ├── .gitignore
│ ├── db.js
│ ├── index.js
│ ├── models
│ └── user.js
│ ├── package-lock.json
│ ├── package.json
│ └── routes
│ ├── auth.js
│ └── users.js
├── final_project_eCommerce
├── Noted.txt
├── config
│ └── db.js
├── controllers
│ ├── cartController.js
│ ├── productController.js
│ └── userController.js
├── ecommerce_postman_collection.json
├── middleware
│ └── auth.js
├── models
│ ├── Product.js
│ └── User.js
├── package-lock.json
├── package.json
├── routes
│ ├── cartRoutes.js
│ ├── productRoutes.js
│ └── userRoutes.js
├── server.js
└── serverr.js
└── python
└── hello.py
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
3 | Mediquity-main
4 | Mediquity/
5 |
--------------------------------------------------------------------------------
/Kanika/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
--------------------------------------------------------------------------------
/Kanika/Kanika-as2.js:
--------------------------------------------------------------------------------
1 | // Perform basic arithmetic operations
2 | let num1 = 10;
3 | let num2 = 5;
4 |
5 | // Addition
6 | let sum = num1 + num2;
7 |
8 | // Subtraction
9 | let difference = num1 - num2;
10 |
11 | // Multiplication
12 | let product = num1 * num2;
13 |
14 | // Division (using division operator)
15 | let division = num1 / num2;
16 |
17 | // Concatenate strings
18 | let str1 = "Hello";
19 | let str2 = "World";
20 | let concatenatedString = str1 + " " + str2;
21 |
22 | // Use a template literal
23 | let name = "Kanika";
24 | let age = 20;
25 | let greeting = `Hello, my name is ${name} and I am ${age} years old.`;
26 |
27 | // Print the results
28 | console.log("Sum:", sum);
29 | console.log("Difference:", difference);
30 | console.log("Product:", product);
31 | console.log("Division:", division);
32 | console.log("Concatenated string:", concatenatedString);
33 | console.log(greeting);
34 |
--------------------------------------------------------------------------------
/Kanika/Kanika-as4.js:
--------------------------------------------------------------------------------
1 | // Print numbers from 1 to 10 using for loop
2 | for (let i = 1; i <= 10; i++) {
3 | console.log(i);
4 | }
5 |
6 | // Print numbers from 10 to 1 using while loop
7 | let j = 10;
8 | while (j > 0) {
9 | console.log(j);
10 | j--;
11 | }
12 |
13 | // Create an array of fruits and print each using for loop
14 | const fruits = ["apple", "banana", "orange", "mango"];
15 | for (let fruit of fruits) {
16 | console.log(fruit);
17 | }
18 |
--------------------------------------------------------------------------------
/Kanika/Kanika.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 |
3 | const app = express();
4 |
5 | app.use(express.urlencoded({ extended: true }));
6 | app.use(express.json());
7 |
8 | app.get("/", (req, res) => {
9 | res.send("
Kanikaaaaaa
");
10 | });
11 |
12 | app.listen(8080, () => {
13 | console.log("Server is running on port 8080");
14 | });
--------------------------------------------------------------------------------
/Kanika/Kanika8thjul.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const port = 8080;
4 | const result = 'Hello World
';
5 |
6 | // Kanika's Simple route
7 | app.get('/apple', (req, res) => {
8 | res.send("Hello from the Apple route");
9 | });
10 |
11 | // Path parameter route
12 | app.get('/fruit/:type', (req, res) => {
13 | res.send(`You requested information about: ${req.params.type}`);
14 | });
15 |
16 | // Multiple path parameters
17 | app.get('/fruit/:type/color/:color', (req, res) => {
18 | res.send(`You requested information about: ${req.params.type} with color: ${req.params.color}`);
19 | });
20 |
21 | // Optional parameters
22 | app.get('/fruit/:type/season/:seasons?', (req, res) => {
23 | const season = req.params.seasons ? req.params.seasons : 'any season';
24 | res.send(`You requested information about: ${req.params.type} in ${season}`);
25 | });
26 |
27 | // Query parameter route
28 | app.get('/search', (req, res) => {
29 | res.send(`You searched for: ${req.query.q}`);
30 | });
31 |
32 | // Chat route
33 | app.get('/chat', (req, res) => {
34 | res.send("Hello from the Chat route");
35 | });
36 |
37 | app.listen(port, () => {
38 | console.log(`Kanika's app is listening at port ${port}`);
39 | });
40 |
--------------------------------------------------------------------------------
/Kanika/kanika-as3.js:
--------------------------------------------------------------------------------
1 | function checkNumber(number) {
2 | if (number > 0) {
3 | console.log("The number is positive.");
4 | } else if (number < 0) {
5 | console.log("The number is negative.");
6 | } else {
7 | console.log("The number is zero.");
8 | }
9 | }
10 |
11 | // Example usage
12 | checkNumber(5); // Output: The number is positive.
13 | checkNumber(-2); // Output: The number is negative.
14 | checkNumber(0); // Output: The number is zero.
15 |
16 |
17 | function greetByTime() {
18 | const currentHour = new Date().getHours(); // Get current hour (0-23)
19 |
20 | if (currentHour >= 5 && currentHour < 12) {
21 | console.log("Good morning!");
22 | } else if (currentHour >= 12 && currentHour < 17) {
23 | console.log("Good afternoon!");
24 | } else {
25 | console.log("Good evening!");
26 | }
27 | }
28 |
29 | // Example usage
30 | greetByTime(); // Output will vary depending on the current time
31 |
--------------------------------------------------------------------------------
/Kanika/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "teaching",
3 | "version": "1.0.0",
4 | "description": "---",
5 | "main": "Kanika-as2.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "express": "^4.19.2"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Mediquity-main.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vinaytheprogrammer/Teaching/d83414211d00f5de48ecbdcaecdd9b32ed83a568/Mediquity-main.zip
--------------------------------------------------------------------------------
/PayalDabas/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
--------------------------------------------------------------------------------
/PayalDabas/5thjuly.js:
--------------------------------------------------------------------------------
1 | // Import the express module
2 | const express = require("express");
3 |
4 | // Create an instance of express
5 | const app = express();
6 |
7 | // Middleware to parse URL-encoded data (form data) with the extended option set to true
8 | app.use(express.urlencoded({ extended: true }));
9 |
10 | // Middleware to parse JSON data
11 | app.use(express.json());
12 |
13 | // Define a GET route at the root path ("/")
14 | app.get("/", (req, res) => {
15 | // Send an HTML response with a heading
16 | res.send("Payal Dabas
");
17 | });
18 |
19 | // Start the server and listen on port 8080
20 | app.listen(8080, () => {
21 | // Log a message to the console indicating the server is running
22 | console.log("Server is running on port 8080");
23 | });
24 |
--------------------------------------------------------------------------------
/PayalDabas/8thjuly.js:
--------------------------------------------------------------------------------
1 | // Import the express module
2 | const express = require("express");
3 |
4 | // Create an instance of express
5 | const app = express();
6 |
7 | // Define the port number where the server will listen
8 | let port = 8080;
9 | let result = 'Hello World
';
10 |
11 | // Simple route example
12 | app.get('/apple', (req, res) => {
13 | res.send("Hello from Apple route");
14 | });
15 |
16 | // Route with a path parameter
17 | app.get('/fruit/:type', (req, res) => {
18 | const fruitType = req.params.type;
19 | res.send(`you requested information about: ${fruitType}`);
20 | });
21 |
22 | // Route with multiple path parameters
23 | app.get('/fruit/:type/color/:color', (req, res) => {
24 | const fruitType = req.params.type;
25 | const color = req.params.color;
26 | res.send(`you requested information about: ${fruitType}" with color: ${color}`);
27 | });
28 |
29 | // Route with optional parameters
30 | app.get('/fruit/:type/season/:seasons?', (req, res) => {
31 | const fruitType = req.params.type;
32 | const season = req.params.season ? req.params.season : 'any season';
33 | res.send(`you requested information about: ${fruitType} in ${season}`);
34 | });
35 |
36 | // Route with a query parameter
37 | app.get('/search', (req, res) => {
38 | const query = req.query.q;
39 | res.send(`You searched for: ${query}`);
40 | });
41 |
42 | // General chat route
43 | app.get('/chat', (req, res) =>{
44 | res.send("Hello from Chat route");
45 | });
46 |
47 | app.listen(port, () => {
48 | console.log(`app is listening at ${port}`);
49 | });
--------------------------------------------------------------------------------
/PayalDabas/file.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vinaytheprogrammer/Teaching/d83414211d00f5de48ecbdcaecdd9b32ed83a568/PayalDabas/file.js
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | ---
3 |
4 | # Teaching Repository
5 |
6 | ## Instructions
7 |
8 | 1. **Clone the Repository:**
9 | ```sh
10 | git clone https://github.com/vinaytheprogrammer/Teaching.git
11 | cd Teaching
12 | ```
13 |
14 | 2. **Create a Directory for the Assignment:**
15 | - For assignment 1, create a directory named `ans1`.
16 |
17 | 3. **Create a File for Your Answers:**
18 | - Inside the `ans1` directory, create a file with your name (e.g., `vinay_gupta.js`).
19 |
20 | 4. **Submit Your Answers:**
21 | - Write and save your answers in the file created in the previous step.
22 |
23 | ## Example
24 |
25 | 1. **Clone the Repository:**
26 | ```sh
27 | git clone https://github.com/vinaytheprogrammer/Teaching.git
28 | cd Teaching
29 | ```
30 |
31 | 2. **Create Directory for Assignment 1:**
32 | ```sh
33 | mkdir ans1
34 | cd ans1
35 | ```
36 |
37 | 3. **Create Your Answer File:**
38 | ```sh
39 | touch vinay_gupta.js
40 | ```
41 |
42 | 4. **Write Your Answers:**
43 | - Open `vinay_gupta.js` in your preferred code editor.
44 | - Write your answers and save the file.
45 |
46 | ## Contributing
47 |
48 | 1. Fork the repository.
49 | 2. Create your feature branch (`git checkout -b feature/your-feature`).
50 | 3. Commit your changes (`git commit -m 'Add some feature'`).
51 | 4. Push to the branch (`git push origin feature/your-feature`).
52 | 5. Open a pull request.
53 |
54 | ---
55 |
56 | ### Example of `vinay_gupta.js`
57 |
58 | ```javascript
59 | // Question 1: Write a function to add two numbers.
60 | function add(a, b) {
61 | return a + b;
62 | }
63 |
64 | console.log(add(2, 3)); // Output: 5
65 | ```
66 |
67 | ---
68 |
69 | Follow these steps to ensure your work is properly organized and submitted. If you have any questions or need further assistance, feel free to contact me.
70 |
71 |
--------------------------------------------------------------------------------
/Rithik/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
--------------------------------------------------------------------------------
/Rithik/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 |
3 | const app = express();
4 |
5 | app.use(express.urlencoded({ extended: true }));
6 | app.use(express.json());
7 |
8 | app.get("/", (req, res) => {
9 | res.send("Rithik
");
10 | });
11 |
12 | app.listen(5001, () => {
13 | console.log("Server is running on port 5001");
14 | });
15 |
--------------------------------------------------------------------------------
/Rithik/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "backend",
3 | "version": "1.0.0",
4 | "description": "Learning Backend ",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "Rithik Yadav",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.19.2",
13 | "nodemon": "^3.1.4"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chinmay branch/chinmay.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vinaytheprogrammer/Teaching/d83414211d00f5de48ecbdcaecdd9b32ed83a568/chinmay branch/chinmay.js
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
--------------------------------------------------------------------------------
/example/Practical1/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
--------------------------------------------------------------------------------
/example/Practical1/app.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const app = express();
3 | const port = 3000;
4 |
5 | app.set('view engine', 'ejs');
6 | app.use(express.static('public'));
7 |
8 | const items = ['Item 1', 'Item 2', 'Item 3'];
9 |
10 | app.get('/', (req, res) => {
11 | res.render('pages/items', { items: items });
12 | });
13 |
14 | app.listen(port, () => {
15 | console.log(`Server is running at http://localhost:${port}`);
16 | });
17 |
--------------------------------------------------------------------------------
/example/Practical1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "ejs": "^3.1.10",
4 | "express": "^4.19.2",
5 | "path": "^0.12.7"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/example/Practical1/public/css/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | background-color: #f4f4f4;
6 | }
7 |
8 | header {
9 | background-color: #333;
10 | color: #fff;
11 | padding: 1rem;
12 | text-align: center;
13 | }
14 |
15 | main {
16 | padding: 1rem;
17 | }
18 |
19 | ul {
20 | list-style-type: none;
21 | padding: 0;
22 | }
23 |
24 | li {
25 | background: #fff;
26 | margin: 0.5rem 0;
27 | padding: 1rem;
28 | border: 1px solid #ccc;
29 | }
30 |
--------------------------------------------------------------------------------
/example/Practical1/views/pages/items.ejs:
--------------------------------------------------------------------------------
1 | <%- include('../partials/header') %>
2 |
3 |
4 | <% items.forEach(function(item) { %>
5 | - <%= item %>
6 | <% }); %>
7 |
8 |
9 |