diff --git a/README.md b/README.md index 9a6ed7c4..f93eadf2 100644 --- a/README.md +++ b/README.md @@ -1,442 +1,491 @@ -# Official Website for the Department of HCD, IIIT-Delhi - -Welcome to the official repository for the Department of Human-Centered Design (HCD) website developed using the MERN (MongoDB, Express.js, React.js, Node.js) stack. This project aims to provide a platform to showcase updates, information, and resources related to the HCD department at Indraprastha Institute of Information Technology, Delhi (IIIT-Delhi). - -- [Figma Community Design](https://www.figma.com/community/file/1115290531089636223): Access our Figma community design for UI/UX reference. -- [Official Website](https://hcd.iiitd.ac.in/): Visit our official website to explore more about our department and its activities. -- [GitHub Repository](https://github.com/VisShon/HCD): Access our GitHub repository for the latest updates and contributions. - -## Contact - -For any questions, feedback, or inquiries regarding the HCD department website, please contact: -[Department of Human-Centered Design](mailto:hcd@iiitd.ac.in) - -# Comprehensive setup and deploymentGuide -Welcome to the comprehensive setup and deployment guide for our Node.js and React application. This guide provides detailed instructions for setting up the development environment, managing the application server, and making necessary changes to the application structure and content. The document is structured to facilitate both new developers and experienced professionals in efficiently setting up and maintaining the application on local and remote machines. - -The directory structure you've posted indicates a project that appears to be a web application with both backend and frontend components. Here’s a breakdown of the structure: - -#### Top-Level Directories and Files -- **backend**: This directory contains the backend application code. -- **backend-old**: Presumably an older version of the backend, kept for reference or rollback purposes. -- **frontend**: This directory contains the frontend application code. - -#### Backend Directory -- **app.js**: Likely the main application file for the backend. -- **bin/www**: Typically, the entry point for starting the server. -- **package.json & package-lock.json**: These files manage the backend’s dependencies. -- **public**: Contains publicly accessible files for the backend. - - **asset-manifest.json, favicon.ico, index.html, manifest.json, robots.txt**: Standard web files. - - **static**: Contains static assets like CSS, JavaScript, and media files. - -#### Backend-old Directory -- Similar structure to the `backend` directory, probably contains a previous version of the backend code. - -#### Frontend Directory -- **build**: Contains the production build of the frontend application. - - **asset-manifest.json, favicon.ico, index.html, manifest.json, robots.txt**: Standard web files. - - **static**: Contains static assets for the frontend similar to the backend static directory. -- **package.json & package-lock.json**: These files manage the frontend’s dependencies. -- **postcss.config.js**: Configuration file for PostCSS, a tool to transform CSS. -- **public**: Publicly accessible files for the frontend. -- **src**: Source code for the frontend application. - - **assets**: Contains images, icons, and other static assets. - -Notable Patterns -1. **Mirroring Structure**: Both the `backend` and `frontend` have similar structures with their own `public` directories and `static` assets. -2. **Media Files**: Numerous media files (images, SVGs) are used in both the backend and frontend, likely for UI elements, icons, and other visual content. -3. **Build Artifacts**: The `build` directory in the frontend indicates the use of a build process, likely using tools like Webpack, Babel, or similar. - -# Table of Contents - -1. [Local Machine Setup](#local-machine-setup) -2. [Entering SSH](#entering-ssh) -3. [Download Server Files](#download-server-files) -4. [Install Node.js and npm](#install-nodejs-and-npm) -5. [Install nvm](#install-nvm) -6. [Procedure of Changes](#procedure-of-changes) -7. [React Structure](#react-structure) -8. [Server Setup](#server-setup) -9. [Running the Server](#running-the-server) -10. [Server Deamon](#server-deamon) -11. [Shell Script for Server Startup](#shell-script-for-server-startup) -12. [File and Directory Operations](#file-and-directory-operations) -13. [Node.js Server Configuration](#nodejs-server-configuration) -14. [Steps to Run the Application](#steps-to-run-the-application) - - -## Local Machine Setup -both of them at contentwise is updated as of June 12 2024. -- ls bali branch -kintsugi@machine:~/Documents/baligit/HCD-1$ ls -backend backend-old frontend package.json package-lock.json Procfile README1.md README.md -backend-old is of machine ,not server -- ls main -it would contain : frontend,backend,other files - -### Enter SSH -``` -ssh iiitd@
-``` - -### Download Server Files -#download server files scp [options] [source] [destination] -``` -scp -r iiitd@:/home/iiitd/HCD-main ~/Documents/server -``` - -### Install Node.js and npm -``` -sudo apt-get install nodejs npm -node -v -npm -v -``` - -### Install nvm -``` -#install nvm14 required -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash -source ~/.bashrc # or source ~/.zshrc depending on your shell -nvm install 14 -nvm use 14 -nvm alias default 14 -``` - -### Procedure of Changes -- install prereq. -- clone main directory -- it would contain : frontend,backend,other files -- do all work in frontend -- yarn install -- yarn start -- ctrl+c - -- cd backend -- rm public -- mkdir public -- copy frontend build data to backend public -- DONE ;0 - -### React Structure -index.js routing -assets mediadata -data jsondata -pages reactpages -styles cssdata -componrnts reactcardpages - -### Server Setup -#Fetch File and yarn install : Don't use github clone etc[signal died],just use wget and for link ,hover over download zip option at github repo and copy link -rm HCD-old #if any -mv HCD-main HCD-old -wget https://github.com/kintsugi-programmer/HCD/archive/refs/heads/main.zip -unzip main.zip -rm main.zip -cd HCD-main/backend -yarn install - -### Running the Server -#stop server -sudo systemctl stop nginx -sudo systemctl stop apache2 -sudo lsof -i :80 -sudo kill 3686 #see PID no. - -#manual run temp -cd HCD-main/backend/bin -sudo node www - -#manual run temp or -cd -./startup.sh - -### Server Deamon -#stop server -sudo systemctl stop nginx -sudo systemctl stop apache2 -sudo lsof -i :80 -sudo kill 3686 #see PID no. - -#server run deamon -sudo systemctl daemon-reload -sudo systemctl restart startup.service - -#exit -exit - -### Shell Script for Server Startup startup.sh -#old -``` -#!/bin/bash -cd /home/iiitd/HCD-main/backend -sudo yarn start -``` - -#temp fix -``` -#!/bin/bash -cd /home/iiitd/HCD-main/backend/bin -sudo node www -``` - -### File and Directory Operations -## ls -``` - -iiitd@hcd:~$ pwd -/home/iiitd -iiitd@hcd:~$ ls -HCD-main history.txt main.zip nohup.out package-lock.json startup.sh -iiitd@hcd:~$ ls -aril -total 606372 -396822 -rw-rw-r-- 1 iiitd iiitd 116 Jun 12 09:38 .yarnrc -395971 drwxrwxr-x 3 iiitd iiitd 4096 Mar 26 17:19 .yarn -393588 -rw-rw-r-- 1 iiitd iiitd 259 Jun 12 10:51 .wget-hsts -395535 -rw------- 1 iiitd iiitd 12167 Mar 23 09:49 .viminfo -393225 -rw-r--r-- 1 iiitd iiitd 0 Feb 10 2023 .sudo_as_admin_successful -394075 -rwxr-xr-x 1 iiitd iiitd 62 Jun 12 10:58 startup.sh -393221 drwx------ 2 iiitd iiitd 4096 Feb 28 2023 .ssh -393590 -rw-rw-r-- 1 iiitd iiitd 66 Aug 7 2023 .selected_editor -393220 -rw-r--r-- 1 iiitd iiitd 807 Jan 6 2022 .profile -393979 -rw-rw-r-- 1 iiitd iiitd 84 Mar 23 08:19 package-lock.json -396823 drwxrwxr-x 2 iiitd iiitd 4096 Jun 12 09:40 .nvm -393269 drwxrwxr-x 4 iiitd iiitd 4096 Jan 31 12:19 .npm -395533 -rw------- 1 iiitd iiitd 58 Mar 23 08:34 nohup.out -393227 -rw-rw-r-- 1 iiitd iiitd 620769677 Jun 12 10:51 main.zip -394158 drwxrwxr-x 3 iiitd iiitd 4096 Aug 7 2023 .local -395957 -rw------- 1 iiitd iiitd 20 Jun 12 09:32 .lesshst -393764 -rw-rw-r-- 1 iiitd iiitd 22768 Jun 12 11:07 history.txt -393228 drwxrwxr-x 5 iiitd iiitd 4096 Jun 12 10:49 HCD-main -393587 -rw-rw-r-- 1 iiitd iiitd 36 Feb 28 2023 .gitconfig -394122 drwx------ 3 iiitd iiitd 4096 Jan 31 12:09 .config -393223 drwx------ 3 iiitd iiitd 4096 Mar 26 17:19 .cache -393218 -rw-r--r-- 1 iiitd iiitd 3771 Jan 6 2022 .bashrc -393219 -rw-r--r-- 1 iiitd iiitd 220 Jan 6 2022 .bash_logout -393226 -rw------- 1 iiitd iiitd 19441 Jun 12 12:10 .bash_history -131073 drwxr-xr-x 3 root root 4096 Feb 10 2023 .. -393217 drwxr-x--- 10 iiitd iiitd 4096 Jun 12 14:26 . -iiitd@hcd:~$ - -``` - -#Rename -``` -mv old_filename new_filename -mv old_foldername new_foldername -``` - -#copy -``` -cp -r /home/iiitd/HCD/backend /home/iiitd/HCD-main/ -``` - - -### Node.js Server Configuration -The provided code sets up a Node.js server using Express to handle both HTTP and HTTPS traffic. Here’s a breakdown of what each part of the code does: - -#### `www` File - -1. **Dependencies and Module Setup**: - ```javascript - const fs = require('fs'); - var express = require('express'); - var app = require('../app'); - var debug = require('debug')('backend:server'); - var http = require('http'); - var https = require('https'); - ``` - -2. **Reading SSL Certificates**: - ```javascript - const privateKey = fs.readFileSync('/etc/letsencrypt/live/hcd.iiitd.ac.in/privkey.pem', 'utf8'); - const certificate = fs.readFileSync('/etc/letsencrypt/live/hcd.iiitd.ac.in/fullchain.pem', 'utf8'); - const credentials = { - key: privateKey, - cert: certificate, - }; - ``` - -3. **Port Normalization**: - ```javascript - var port = normalizePort(process.env.PORT || '80'); - var httpsport = normalizePort(process.env.PORT || '443'); - app.set('port', port); - ``` - -4. **Creating HTTP and HTTPS Servers**: - ```javascript - var httpsServer = https.createServer(credentials, app); - const redirector = express(); - redirector.get('*', (req, res) => res.redirect("https://" + req.headers.host + req.url)); - const httpServer = http.createServer(redirector); - ``` - -5. **Starting Servers and Setting Up Event Listeners**: - ```javascript - httpsServer.listen(httpsport); - httpsServer.on('error', onError); - httpsServer.on('listening', onListening); - - httpServer.listen(port); - httpServer.on('error', onError); - httpServer.on('listening', onListening); - ``` - -6. **Port Normalization Function**: - ```javascript - function normalizePort(val) { - var port = parseInt(val, 10); - if (isNaN(port)) { - return val; - } - if (port >= 0) { - return port; - } - return false; - } - ``` - -7. **Error Handling**: - ```javascript - function onError(error) { - if (error.syscall !== 'listen') { - throw error; - } - var bind = typeof port === 'string' - ? 'Pipe ' + port - : 'Port ' + port; - - switch (error.code) { - case 'EACCES': - console.error(bind + ' requires elevated privileges'); - process.exit(1); - break; - case 'EADDRINUSE': - console.error(bind + ' is already in use'); - process.exit(1); - break; - default: - throw error; - } - } - ``` - -8. **Listening Event**: - ```javascript - function onListening() { - var addr = httpsServer.address(); - var bind = typeof addr === 'string' - ? 'pipe ' + addr - : 'port ' + addr.port; - debug('Listening on ' + bind); - } - ``` - -#### `server.js` File - -1. **Express Setup**: - ```javascript - var express = require('express'); - var path = require('path'); - var app = express(); - - app.use(express.json()); - app.use(express.urlencoded({ extended: false })); - app.use(express.static(path.join(__dirname, 'public'))); - ``` - -2. **Catch-All Route**: - ```javascript - app.get('*', (req, res) => { - res.sendFile(path.join(__dirname, 'public', 'index.html')); - }); - - module.exports = app; - ``` - -#### Explanation - -1. **SSL Certificates**: The code reads SSL certificates from the specified paths, which are required to enable HTTPS. -2. **Port Configuration**: It normalizes the port values for HTTP and HTTPS. -3. **Server Setup**: It creates both HTTP and HTTPS servers. The HTTP server is set up to redirect all traffic to HTTPS, ensuring secure communication. -4. **Error Handling**: Functions to handle and log errors during server startup. -5. **Catch-All Route**: In `server.js`, it serves the `index.html` file for any route, allowing the front-end to handle routing (useful for single-page applications). - -#### Usage - -- **Starting the Server**: To start the server, you need to run the `www` script. -- **SSL Configuration**: Ensure that the SSL certificate paths are correct and the files are accessible. -- **Environment Variables**: Optionally, you can set `PORT` and `HTTPS_PORT` environment variables to customize the ports. If not set, it defaults to `80` for HTTP and `443` for HTTPS. - -This setup ensures that all HTTP traffic is redirected to HTTPS, which is a common practice to enhance security by enforcing encrypted communication. -To run the provided Node.js application, follow these steps: - -#### Prerequisites -1. **Node.js and npm**: Ensure Node.js and npm (Node Package Manager) are installed on your system. You can download and install them from [nodejs.org](https://nodejs.org/). -2. **SSL Certificates**: Make sure you have valid SSL certificates placed in the specified paths (`/etc/letsencrypt/live/hcd.iiitd.ac.in/privkey.pem` and `/etc/letsencrypt/live/hcd.iiitd.ac.in/fullchain.pem`). - -#### Steps to Run the Application - -1. **Project Structure**: - Ensure your project directory looks something like this: - ``` - your-project/ - ├── bin/ - │ └── www - ├── public/ - │ └── index.html - ├── app.js (if applicable, not shown in your example) - └── server.js - ``` - -2. **Install Dependencies**: - Navigate to your project directory in the terminal and install the required Node.js packages. - ```bash - cd your-project - npm install express debug - ``` - -3. **Check SSL Certificates**: - Ensure that the paths specified in your `www` script for the SSL certificates are correct and that the files are accessible. This might require sudo or root permissions depending on your server setup. - -4. **Running the Application**: - You can run the server using `node`. If your `www` file is located in the `bin` directory as shown, you can start it by running: - ```bash - node bin/www - ``` - Alternatively, you might need to provide the correct path if your structure differs. - -5. **Using a Process Manager** (Optional but recommended): - To keep your server running and manage restarts in case of crashes, use a process manager like `pm2`: - ```bash - npm install -g pm2 - pm2 start bin/www - pm2 save - pm2 startup - ``` - This will ensure your application runs in the background and restarts automatically on failure. - -#### Additional Considerations - -- **Permissions**: If you encounter permission errors while accessing the SSL certificates or binding to ports 80 and 443, you might need to run the command with `sudo`: - ```bash - sudo node bin/www - ``` - -- **Environment Variables**: If you want to specify custom ports or other environment variables, you can set them before running the application: - ```bash - PORT=8080 HTTPS_PORT=8443 node bin/www - ``` - -- **Debugging**: The script uses the `debug` module to log messages. You can enable debug messages by setting the `DEBUG` environment variable: - ```bash - DEBUG=backend:server node bin/www - ``` - -- **Security**: Make sure your SSL certificates are correctly configured and up-to-date. Using Let's Encrypt is a good option for obtaining free SSL certificates. - -By following these steps, you should be able to run your Node.js application with both HTTP and HTTPS support. - -### Steps to Run the Application -- Local Machine : Run at Frontend till Changes Procedure done [Local Machine Setup](#local-machine-setup) & 6. [Procedure of Changes](#procedure-of-changes) -- Server : Run at Backend 9. [Running the Server](#running-the-server) +# Official Website for the Department of HCD, IIIT-Delhi + +Welcome to the official repository for the Department of Human-Centered Design (HCD) website developed using the MERN (MongoDB, Express.js, React.js, Node.js) stack. This project aims to provide a platform to showcase updates, information, and resources related to the HCD department at Indraprastha Institute of Information Technology, Delhi (IIIT-Delhi). + +- [Figma Community Design](https://www.figma.com/community/file/1115290531089636223): Access our Figma community design for UI/UX reference. +- [Official Website](https://hcd.iiitd.ac.in/): Visit our official website to explore more about our department and its activities. +- [GitHub Repository](https://github.com/VisShon/HCD): Access our GitHub repository for the latest updates and contributions. + +## Contact + +For any questions, feedback, or inquiries regarding the HCD department website, please contact: +[Department of Human-Centered Design](mailto:hcd@iiitd.ac.in) + +# Comprehensive setup and deploymentGuide + +Welcome to the comprehensive setup and deployment guide for our Node.js and React application. This guide provides detailed instructions for setting up the development environment, managing the application server, and making necessary changes to the application structure and content. The document is structured to facilitate both new developers and experienced professionals in efficiently setting up and maintaining the application on local and remote machines. + +The directory structure you've posted indicates a project that appears to be a web application with both backend and frontend components. Here’s a breakdown of the structure: + +#### Top-Level Directories and Files + +- **backend**: This directory contains the backend application code. +- **backend-old**: Presumably an older version of the backend, kept for reference or rollback purposes. +- **frontend**: This directory contains the frontend application code. + +#### Backend Directory + +- **app.js**: Likely the main application file for the backend. +- **bin/www**: Typically, the entry point for starting the server. +- **package.json & package-lock.json**: These files manage the backend’s dependencies. +- **public**: Contains publicly accessible files for the backend. + - **asset-manifest.json, favicon.ico, index.html, manifest.json, robots.txt**: Standard web files. + - **static**: Contains static assets like CSS, JavaScript, and media files. + +#### Backend-old Directory + +- Similar structure to the `backend` directory, probably contains a previous version of the backend code. + +#### Frontend Directory + +- **build**: Contains the production build of the frontend application. + - **asset-manifest.json, favicon.ico, index.html, manifest.json, robots.txt**: Standard web files. + - **static**: Contains static assets for the frontend similar to the backend static directory. +- **package.json & package-lock.json**: These files manage the frontend’s dependencies. +- **postcss.config.js**: Configuration file for PostCSS, a tool to transform CSS. +- **public**: Publicly accessible files for the frontend. +- **src**: Source code for the frontend application. + - **assets**: Contains images, icons, and other static assets. + +Notable Patterns + +1. **Mirroring Structure**: Both the `backend` and `frontend` have similar structures with their own `public` directories and `static` assets. +2. **Media Files**: Numerous media files (images, SVGs) are used in both the backend and frontend, likely for UI elements, icons, and other visual content. +3. **Build Artifacts**: The `build` directory in the frontend indicates the use of a build process, likely using tools like Webpack, Babel, or similar. + +# Table of Contents + +1. [Local Machine Setup](#local-machine-setup) +2. [Entering SSH](#entering-ssh) +3. [Download Server Files](#download-server-files) +4. [Install Node.js and npm](#install-nodejs-and-npm) +5. [Install nvm](#install-nvm) +6. [Procedure of Changes](#procedure-of-changes) +7. [React Structure](#react-structure) +8. [Server Setup](#server-setup) +9. [Running the Server](#running-the-server) +10. [Server Deamon](#server-deamon) +11. [Shell Script for Server Startup](#shell-script-for-server-startup) +12. [File and Directory Operations](#file-and-directory-operations) +13. [Node.js Server Configuration](#nodejs-server-configuration) +14. [Steps to Run the Application](#steps-to-run-the-application) + +## Local Machine Setup + +both of them at contentwise is updated as of June 12 2024. + +- ls bali branch + kintsugi@machine:~/Documents/baligit/HCD-1$ ls + backend backend-old frontend package.json package-lock.json Procfile README1.md README.md + backend-old is of machine ,not server +- ls main + it would contain : frontend,backend,other files + +### Enter SSH + +``` +ssh iiitd@ +``` + +### Download Server Files + +#download server files scp [options] [source] [destination] + +``` +scp -r iiitd@:/home/iiitd/HCD-main ~/Documents/server +``` + +### Install Node.js and npm + +``` +sudo apt-get install nodejs npm +node -v +npm -v +``` + +### Install nvm + +``` +#install nvm14 required +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash +source ~/.bashrc # or source ~/.zshrc depending on your shell +nvm install 14 +nvm use 14 +nvm alias default 14 +``` + +### Procedure of Changes + +- install prereq. +- clone main directory +- it would contain : frontend,backend,other files +- do all work in frontend +- yarn install +- yarn start +- ctrl+c +- yarn build + +- cd backend +- rm public +- mkdir public +- copy frontend build data to backend public +- commit and push +- DONE ;0 + +### React Structure + +index.js routing +assets mediadata +data jsondata +pages reactpages +styles cssdata +componrnts reactcardpages + +### Server Setup + +#Fetch File and yarn install : Don't use github clone etc[signal died],just use wget and for link ,hover over download zip option at github repo and copy link +rm HCD-old #if any +mv HCD-main HCD-old +wget https://github.com/kintsugi-programmer/HCD/archive/refs/heads/main.zip +unzip main.zip +rm main.zip +cd HCD-main/backend +yarn install +yarn build + +### Running the Server + +#stop server +sudo systemctl stop nginx +sudo systemctl stop apache2 +sudo lsof -i :80 +sudo kill 3686 #see PID no. + +#manual run temp +cd HCD-main/backend/bin +sudo node www + +#manual run temp or +cd +./startup.sh + +### Server Deamon + +#stop server +sudo systemctl stop nginx +sudo systemctl stop apache2 +sudo lsof -i :80 +sudo kill 3686 #see PID no. + +#server run deamon +sudo systemctl daemon-reload +sudo systemctl restart startup.service + +#exit +exit + +### Shell Script for Server Startup startup.sh + +#old + +``` +#!/bin/bash +cd /home/iiitd/HCD-main/backend +sudo yarn start +``` + +#temp fix + +``` +#!/bin/bash +cd /home/iiitd/HCD-main/backend/bin +sudo node www +``` + +### File and Directory Operations + +## ls + +``` + +iiitd@hcd:~$ pwd +/home/iiitd +iiitd@hcd:~$ ls +HCD-main history.txt main.zip nohup.out package-lock.json startup.sh +iiitd@hcd:~$ ls -aril +total 606372 +396822 -rw-rw-r-- 1 iiitd iiitd 116 Jun 12 09:38 .yarnrc +395971 drwxrwxr-x 3 iiitd iiitd 4096 Mar 26 17:19 .yarn +393588 -rw-rw-r-- 1 iiitd iiitd 259 Jun 12 10:51 .wget-hsts +395535 -rw------- 1 iiitd iiitd 12167 Mar 23 09:49 .viminfo +393225 -rw-r--r-- 1 iiitd iiitd 0 Feb 10 2023 .sudo_as_admin_successful +394075 -rwxr-xr-x 1 iiitd iiitd 62 Jun 12 10:58 startup.sh +393221 drwx------ 2 iiitd iiitd 4096 Feb 28 2023 .ssh +393590 -rw-rw-r-- 1 iiitd iiitd 66 Aug 7 2023 .selected_editor +393220 -rw-r--r-- 1 iiitd iiitd 807 Jan 6 2022 .profile +393979 -rw-rw-r-- 1 iiitd iiitd 84 Mar 23 08:19 package-lock.json +396823 drwxrwxr-x 2 iiitd iiitd 4096 Jun 12 09:40 .nvm +393269 drwxrwxr-x 4 iiitd iiitd 4096 Jan 31 12:19 .npm +395533 -rw------- 1 iiitd iiitd 58 Mar 23 08:34 nohup.out +393227 -rw-rw-r-- 1 iiitd iiitd 620769677 Jun 12 10:51 main.zip +394158 drwxrwxr-x 3 iiitd iiitd 4096 Aug 7 2023 .local +395957 -rw------- 1 iiitd iiitd 20 Jun 12 09:32 .lesshst +393764 -rw-rw-r-- 1 iiitd iiitd 22768 Jun 12 11:07 history.txt +393228 drwxrwxr-x 5 iiitd iiitd 4096 Jun 12 10:49 HCD-main +393587 -rw-rw-r-- 1 iiitd iiitd 36 Feb 28 2023 .gitconfig +394122 drwx------ 3 iiitd iiitd 4096 Jan 31 12:09 .config +393223 drwx------ 3 iiitd iiitd 4096 Mar 26 17:19 .cache +393218 -rw-r--r-- 1 iiitd iiitd 3771 Jan 6 2022 .bashrc +393219 -rw-r--r-- 1 iiitd iiitd 220 Jan 6 2022 .bash_logout +393226 -rw------- 1 iiitd iiitd 19441 Jun 12 12:10 .bash_history +131073 drwxr-xr-x 3 root root 4096 Feb 10 2023 .. +393217 drwxr-x--- 10 iiitd iiitd 4096 Jun 12 14:26 . +iiitd@hcd:~$ + +``` + +#Rename + +``` +mv old_filename new_filename +mv old_foldername new_foldername +``` + +#copy + +``` +cp -r /home/iiitd/HCD/backend /home/iiitd/HCD-main/ +``` + +### Node.js Server Configuration + +The provided code sets up a Node.js server using Express to handle both HTTP and HTTPS traffic. Here’s a breakdown of what each part of the code does: + +#### `www` File + +1. **Dependencies and Module Setup**: + + ```javascript + const fs = require("fs"); + var express = require("express"); + var app = require("../app"); + var debug = require("debug")("backend:server"); + var http = require("http"); + var https = require("https"); + ``` + +2. **Reading SSL Certificates**: + + ```javascript + const privateKey = fs.readFileSync( + "/etc/letsencrypt/live/hcd.iiitd.ac.in/privkey.pem", + "utf8" + ); + const certificate = fs.readFileSync( + "/etc/letsencrypt/live/hcd.iiitd.ac.in/fullchain.pem", + "utf8" + ); + const credentials = { + key: privateKey, + cert: certificate, + }; + ``` + +3. **Port Normalization**: + + ```javascript + var port = normalizePort(process.env.PORT || "80"); + var httpsport = normalizePort(process.env.PORT || "443"); + app.set("port", port); + ``` + +4. **Creating HTTP and HTTPS Servers**: + + ```javascript + var httpsServer = https.createServer(credentials, app); + const redirector = express(); + redirector.get("*", (req, res) => + res.redirect("https://" + req.headers.host + req.url) + ); + const httpServer = http.createServer(redirector); + ``` + +5. **Starting Servers and Setting Up Event Listeners**: + + ```javascript + httpsServer.listen(httpsport); + httpsServer.on("error", onError); + httpsServer.on("listening", onListening); + + httpServer.listen(port); + httpServer.on("error", onError); + httpServer.on("listening", onListening); + ``` + +6. **Port Normalization Function**: + + ```javascript + function normalizePort(val) { + var port = parseInt(val, 10); + if (isNaN(port)) { + return val; + } + if (port >= 0) { + return port; + } + return false; + } + ``` + +7. **Error Handling**: + + ```javascript + function onError(error) { + if (error.syscall !== "listen") { + throw error; + } + var bind = typeof port === "string" ? "Pipe " + port : "Port " + port; + + switch (error.code) { + case "EACCES": + console.error(bind + " requires elevated privileges"); + process.exit(1); + break; + case "EADDRINUSE": + console.error(bind + " is already in use"); + process.exit(1); + break; + default: + throw error; + } + } + ``` + +8. **Listening Event**: + ```javascript + function onListening() { + var addr = httpsServer.address(); + var bind = typeof addr === "string" ? "pipe " + addr : "port " + addr.port; + debug("Listening on " + bind); + } + ``` + +#### `server.js` File + +1. **Express Setup**: + + ```javascript + var express = require("express"); + var path = require("path"); + var app = express(); + + app.use(express.json()); + app.use(express.urlencoded({ extended: false })); + app.use(express.static(path.join(__dirname, "public"))); + ``` + +2. **Catch-All Route**: + + ```javascript + app.get("*", (req, res) => { + res.sendFile(path.join(__dirname, "public", "index.html")); + }); + + module.exports = app; + ``` + +#### Explanation + +1. **SSL Certificates**: The code reads SSL certificates from the specified paths, which are required to enable HTTPS. +2. **Port Configuration**: It normalizes the port values for HTTP and HTTPS. +3. **Server Setup**: It creates both HTTP and HTTPS servers. The HTTP server is set up to redirect all traffic to HTTPS, ensuring secure communication. +4. **Error Handling**: Functions to handle and log errors during server startup. +5. **Catch-All Route**: In `server.js`, it serves the `index.html` file for any route, allowing the front-end to handle routing (useful for single-page applications). + +#### Usage + +- **Starting the Server**: To start the server, you need to run the `www` script. +- **SSL Configuration**: Ensure that the SSL certificate paths are correct and the files are accessible. +- **Environment Variables**: Optionally, you can set `PORT` and `HTTPS_PORT` environment variables to customize the ports. If not set, it defaults to `80` for HTTP and `443` for HTTPS. + +This setup ensures that all HTTP traffic is redirected to HTTPS, which is a common practice to enhance security by enforcing encrypted communication. +To run the provided Node.js application, follow these steps: + +#### Prerequisites + +1. **Node.js and npm**: Ensure Node.js and npm (Node Package Manager) are installed on your system. You can download and install them from [nodejs.org](https://nodejs.org/). +2. **SSL Certificates**: Make sure you have valid SSL certificates placed in the specified paths (`/etc/letsencrypt/live/hcd.iiitd.ac.in/privkey.pem` and `/etc/letsencrypt/live/hcd.iiitd.ac.in/fullchain.pem`). + +#### Steps to Run the Application + +1. **Project Structure**: + Ensure your project directory looks something like this: + + ``` + your-project/ + ├── bin/ + │ └── www + ├── public/ + │ └── index.html + ├── app.js (if applicable, not shown in your example) + └── server.js + ``` + +2. **Install Dependencies**: + Navigate to your project directory in the terminal and install the required Node.js packages. + + ```bash + cd your-project + npm install express debug + ``` + +3. **Check SSL Certificates**: + Ensure that the paths specified in your `www` script for the SSL certificates are correct and that the files are accessible. This might require sudo or root permissions depending on your server setup. + +4. **Running the Application**: + You can run the server using `node`. If your `www` file is located in the `bin` directory as shown, you can start it by running: + + ```bash + node bin/www + ``` + + Alternatively, you might need to provide the correct path if your structure differs. + +5. **Using a Process Manager** (Optional but recommended): + To keep your server running and manage restarts in case of crashes, use a process manager like `pm2`: + ```bash + npm install -g pm2 + pm2 start bin/www + pm2 save + pm2 startup + ``` + This will ensure your application runs in the background and restarts automatically on failure. + +#### Additional Considerations + +- **Permissions**: If you encounter permission errors while accessing the SSL certificates or binding to ports 80 and 443, you might need to run the command with `sudo`: + + ```bash + sudo node bin/www + ``` + +- **Environment Variables**: If you want to specify custom ports or other environment variables, you can set them before running the application: + + ```bash + PORT=8080 HTTPS_PORT=8443 node bin/www + ``` + +- **Debugging**: The script uses the `debug` module to log messages. You can enable debug messages by setting the `DEBUG` environment variable: + + ```bash + DEBUG=backend:server node bin/www + ``` + +- **Security**: Make sure your SSL certificates are correctly configured and up-to-date. Using Let's Encrypt is a good option for obtaining free SSL certificates. + +By following these steps, you should be able to run your Node.js application with both HTTP and HTTPS support. + +### Steps to Run the Application + +- Local Machine : Run at Frontend till Changes Procedure done [Local Machine Setup](#local-machine-setup) & 6. [Procedure of Changes](#procedure-of-changes) +- Server : Run at Backend 9. [Running the Server](#running-the-server) diff --git a/README1.md b/README1.md new file mode 100644 index 00000000..69a0dc18 --- /dev/null +++ b/README1.md @@ -0,0 +1,53 @@ +Readme + + +// Announcements.jsx +// As of now, the components of frontend/src/pages/ResearchProj.jsx is being used so to avoid space we ahve used all its components in it too. It was created to display announcements on the website. + +frontend/src/data/newsData.json & frontend/src/components/About/newsSection.jsx is waste file + +not to touch build folder..as no need + +Changes Did : +- Footer Changed & Animated with css frontend/src/components/footer.jsx +- NEWS Navbar Section frontend/src/components/navbar.jsx +- Navbar New Links added frontend/src/components/navbar.jsx +- +- Announcements Page with Card,Description,and json file [text](frontend/src/pages/Announcements.jsx) +- Google Scholar or https://iiitd.irins.org/ Data collect IIITD Web Faculty link frontend/src/data/facultyPageData.json +- Link to IIITD Web Faculty link at Faculty Page frontend/src/components/People/facultyCard.jsx +- Data collect IIITD Web Faculty link frontend/src/data/facultyPageData.json +- Link to IIITD Web Faculty link at Faculty Page frontend/src/components/People/facultyCard.jsx +- navbar logo error done + + +to + +- navbar.jsx +{/* + // ABOUT US PAGE IS NOT THERE + ABOUT */} + {/*a||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","var camel2hyphen = function (str) {\n return str\n .replace(/[A-Z]/g, function (match) {\n return '-' + match.toLowerCase();\n })\n .toLowerCase();\n};\n\nmodule.exports = camel2hyphen;","var map = {\n\t\"./collab1.png\": 9307,\n\t\"./collab10.png\": 7369,\n\t\"./collab11.png\": 6947,\n\t\"./collab12.png\": 8943,\n\t\"./collab13.png\": 1020,\n\t\"./collab14.png\": 639,\n\t\"./collab15.png\": 587,\n\t\"./collab16.png\": 6365,\n\t\"./collab2.png\": 1877,\n\t\"./collab3.png\": 5257,\n\t\"./collab4.png\": 3052,\n\t\"./collab5.png\": 2173,\n\t\"./collab6.png\": 1923,\n\t\"./collab7.png\": 1182,\n\t\"./collab9.png\": 872\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7468;","var map = {\n\t\"./AdarshPandey.jpg\": 353,\n\t\"./Anu.jpg\": 7952,\n\t\"./ChandramaMallick.jpeg\": 8273,\n\t\"./Jainendra.png\": 8649,\n\t\"./Kalpana_1.png\": 1135,\n\t\"./Kalpana_podium.png\": 9503,\n\t\"./ManshulVBelani.jpg\": 8630,\n\t\"./Punit.jpg\": 7448,\n\t\"./ShikhaSharma.jpg\": 4421,\n\t\"./abhijeet.png\": 7891,\n\t\"./abhinavd.jpg\": 3885,\n\t\"./aman.png\": 7992,\n\t\"./amanPodium.png\": 8976,\n\t\"./amanparnami.png\": 6635,\n\t\"./angsu.png\": 7166,\n\t\"./anmol.png\": 1902,\n\t\"./anmols.jpg\": 3793,\n\t\"./anoop.png\": 9675,\n\t\"./anoopPodium.png\": 8965,\n\t\"./archan.jpg\": 8925,\n\t\"./arun.png\": 8538,\n\t\"./binu.png\": 3058,\n\t\"./grace.png\": 4227,\n\t\"./gracePodium.png\": 7627,\n\t\"./helen.jpg\": 1332,\n\t\"./jayPodium.png\": 3588,\n\t\"./kalpana.jpg\": 4977,\n\t\"./kapil.png\": 530,\n\t\"./mark.jpg\": 141,\n\t\"./parnamiPodium.png\": 9838,\n\t\"./pragmapodium.png\": 9137,\n\t\"./rajesh.png\": 6318,\n\t\"./rajivPodium.png\": 1703,\n\t\"./ratn.png\": 6104,\n\t\"./ravi.jpg\": 2248,\n\t\"./removed/VaibhaviKowshik.jpg\": 4867,\n\t\"./removed/amitPodium.png\": 2158,\n\t\"./removed/podium.png\": 7801,\n\t\"./richaPodium.png\": 6918,\n\t\"./richagupta.png\": 8218,\n\t\"./sonal.jpg\": 6695,\n\t\"./sonal.png\": 1055,\n\t\"./sonalpodium.png\": 6145,\n\t\"./vinish.png\": 5308\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 8199;","var map = {\n\t\"./Gallery.png\": 9716,\n\t\"./Research.png\": 4577,\n\t\"./academics/PHDimg.svg\": 5091,\n\t\"./academics/acadSec1Img.png\": 5243,\n\t\"./academics/acadSec1Mobile.png\": 8467,\n\t\"./academics/admission.png\": 7896,\n\t\"./academics/admissions.svg\": 8893,\n\t\"./academics/arrow.svg\": 6257,\n\t\"./academics/butterflyBGR.svg\": 1606,\n\t\"./academics/tree1.svg\": 9671,\n\t\"./aid.png\": 1621,\n\t\"./aidImg.png\": 6324,\n\t\"./aidImg.svg\": 7629,\n\t\"./alumini.png\": 8671,\n\t\"./art.png\": 6979,\n\t\"./bBtn.png\": 9058,\n\t\"./bcg.png\": 7724,\n\t\"./bcgStill.png\": 4777,\n\t\"./bird.png\": 3100,\n\t\"./bird2.png\": 9391,\n\t\"./bird3.png\": 4698,\n\t\"./brain.png\": 381,\n\t\"./cdnm.png\": 1417,\n\t\"./cdnmImg.png\": 4751,\n\t\"./clouds.png\": 1673,\n\t\"./coding.png\": 2622,\n\t\"./collabs/collab1.png\": 9307,\n\t\"./collabs/collab10.png\": 7369,\n\t\"./collabs/collab11.png\": 6947,\n\t\"./collabs/collab12.png\": 8943,\n\t\"./collabs/collab13.png\": 1020,\n\t\"./collabs/collab14.png\": 639,\n\t\"./collabs/collab15.png\": 587,\n\t\"./collabs/collab16.png\": 6365,\n\t\"./collabs/collab2.png\": 1877,\n\t\"./collabs/collab3.png\": 5257,\n\t\"./collabs/collab4.png\": 3052,\n\t\"./collabs/collab5.png\": 2173,\n\t\"./collabs/collab6.png\": 1923,\n\t\"./collabs/collab7.png\": 1182,\n\t\"./collabs/collab9.png\": 872,\n\t\"./creative.png\": 4004,\n\t\"./di.png\": 6343,\n\t\"./dreamrs.png\": 4409,\n\t\"./dropN.svg\": 7873,\n\t\"./edtm_icon.png\": 1611,\n\t\"./edtm_panel.png\": 6717,\n\t\"./etdm.png\": 8373,\n\t\"./events/event_1.png\": 2067,\n\t\"./events/event_10.jpg\": 6191,\n\t\"./events/event_11.jpg\": 993,\n\t\"./events/event_12.jpg\": 7018,\n\t\"./events/event_13.jpg\": 3194,\n\t\"./events/event_14.jpg\": 5138,\n\t\"./events/event_15.jpg\": 2124,\n\t\"./events/event_16.png\": 9760,\n\t\"./events/event_17.jpg\": 3123,\n\t\"./events/event_18.jpg\": 3189,\n\t\"./events/event_19.jpg\": 538,\n\t\"./events/event_2.png\": 1176,\n\t\"./events/event_20.jpg\": 9357,\n\t\"./events/event_21.jpg\": 8584,\n\t\"./events/event_22.jpg\": 6741,\n\t\"./events/event_23.png\": 970,\n\t\"./events/event_24.jpg\": 2236,\n\t\"./events/event_25.jpg\": 3027,\n\t\"./events/event_26.jpg\": 4334,\n\t\"./events/event_27.jpg\": 3313,\n\t\"./events/event_28.jpg\": 7298,\n\t\"./events/event_29.jpg\": 9940,\n\t\"./events/event_3.png\": 9273,\n\t\"./events/event_30.jpg\": 9377,\n\t\"./events/event_31.jpg\": 9050,\n\t\"./events/event_32.jpg\": 437,\n\t\"./events/event_33.jpg\": 4733,\n\t\"./events/event_34.jpg\": 3891,\n\t\"./events/event_35.png\": 4350,\n\t\"./events/event_36.jpg\": 9466,\n\t\"./events/event_37.jpg\": 9913,\n\t\"./events/event_38.jpg\": 4499,\n\t\"./events/event_39.jpg\": 1533,\n\t\"./events/event_4.png\": 6939,\n\t\"./events/event_40.jpg\": 3229,\n\t\"./events/event_41.jpg\": 1006,\n\t\"./events/event_42.jpg\": 9381,\n\t\"./events/event_43.jpg\": 5473,\n\t\"./events/event_44.jpg\": 4750,\n\t\"./events/event_45.png\": 8309,\n\t\"./events/event_46.jpg\": 2777,\n\t\"./events/event_47.jpg\": 6718,\n\t\"./events/event_48.jpg\": 1833,\n\t\"./events/event_49.jpg\": 4195,\n\t\"./events/event_5.png\": 7673,\n\t\"./events/event_50.png\": 4980,\n\t\"./events/event_51.png\": 7155,\n\t\"./events/event_52.jpg\": 7421,\n\t\"./events/event_53.jpg\": 8055,\n\t\"./events/event_54.jpg\": 6384,\n\t\"./events/event_55.jpg\": 6839,\n\t\"./events/event_56.jpg\": 8605,\n\t\"./events/event_57.jpg\": 6533,\n\t\"./events/event_58.jpg\": 3153,\n\t\"./events/event_59.jpg\": 1849,\n\t\"./events/event_6.png\": 9931,\n\t\"./events/event_60.jpg\": 7703,\n\t\"./events/event_61.png\": 2249,\n\t\"./events/event_62.jpg\": 9442,\n\t\"./events/event_63.jpg\": 4637,\n\t\"./events/event_64.jpg\": 9110,\n\t\"./events/event_65.jpg\": 9192,\n\t\"./events/event_7.png\": 3816,\n\t\"./events/event_8.jpg\": 5704,\n\t\"./events/event_9.jpg\": 738,\n\t\"./facebook.png\": 8900,\n\t\"./faculty.jpg\": 7866,\n\t\"./facultyImg.png\": 440,\n\t\"./final.mp4\": 3741,\n\t\"./final0.mp4\": 3094,\n\t\"./final2.mp4\": 7263,\n\t\"./hands.png\": 9916,\n\t\"./hands.svg\": 8609,\n\t\"./hcdFaculty.png\": 663,\n\t\"./hci.png\": 4906,\n\t\"./hci.svg\": 1335,\n\t\"./hmi.png\": 9701,\n\t\"./insta.png\": 7948,\n\t\"./linkedin.png\": 1654,\n\t\"./living.png\": 4133,\n\t\"./logo.png\": 6949,\n\t\"./midas.png\": 8602,\n\t\"./midasImg.png\": 3868,\n\t\"./midasImg.svg\": 8102,\n\t\"./persisst.png\": 9964,\n\t\"./persisst2.png\": 6495,\n\t\"./profsImg/AdarshPandey.jpg\": 353,\n\t\"./profsImg/Anu.jpg\": 7952,\n\t\"./profsImg/ChandramaMallick.jpeg\": 8273,\n\t\"./profsImg/Jainendra.png\": 8649,\n\t\"./profsImg/Kalpana_1.png\": 1135,\n\t\"./profsImg/Kalpana_podium.png\": 9503,\n\t\"./profsImg/ManshulVBelani.jpg\": 8630,\n\t\"./profsImg/Punit.jpg\": 7448,\n\t\"./profsImg/ShikhaSharma.jpg\": 4421,\n\t\"./profsImg/abhijeet.png\": 7891,\n\t\"./profsImg/abhinavd.jpg\": 3885,\n\t\"./profsImg/aman.png\": 7992,\n\t\"./profsImg/amanPodium.png\": 8976,\n\t\"./profsImg/amanparnami.png\": 6635,\n\t\"./profsImg/angsu.png\": 7166,\n\t\"./profsImg/anmol.png\": 1902,\n\t\"./profsImg/anmols.jpg\": 3793,\n\t\"./profsImg/anoop.png\": 9675,\n\t\"./profsImg/anoopPodium.png\": 8965,\n\t\"./profsImg/archan.jpg\": 8925,\n\t\"./profsImg/arun.png\": 8538,\n\t\"./profsImg/binu.png\": 3058,\n\t\"./profsImg/grace.png\": 4227,\n\t\"./profsImg/gracePodium.png\": 7627,\n\t\"./profsImg/helen.jpg\": 1332,\n\t\"./profsImg/jayPodium.png\": 3588,\n\t\"./profsImg/kalpana.jpg\": 4977,\n\t\"./profsImg/kapil.png\": 530,\n\t\"./profsImg/mark.jpg\": 141,\n\t\"./profsImg/parnamiPodium.png\": 9838,\n\t\"./profsImg/pragmapodium.png\": 9137,\n\t\"./profsImg/rajesh.png\": 6318,\n\t\"./profsImg/rajivPodium.png\": 1703,\n\t\"./profsImg/ratn.png\": 6104,\n\t\"./profsImg/ravi.jpg\": 2248,\n\t\"./profsImg/removed/VaibhaviKowshik.jpg\": 4867,\n\t\"./profsImg/removed/amitPodium.png\": 2158,\n\t\"./profsImg/removed/podium.png\": 7801,\n\t\"./profsImg/richaPodium.png\": 6918,\n\t\"./profsImg/richagupta.png\": 8218,\n\t\"./profsImg/sonal.jpg\": 6695,\n\t\"./profsImg/sonal.png\": 1055,\n\t\"./profsImg/sonalpodium.png\": 6145,\n\t\"./profsImg/vinish.png\": 5308,\n\t\"./pup.png\": 841,\n\t\"./robo.png\": 4168,\n\t\"./sad.svg\": 825,\n\t\"./shadow.png\": 1722,\n\t\"./speaker.png\": 4756,\n\t\"./studentIcon.png\": 9934,\n\t\"./students.png\": 9407,\n\t\"./tweet.png\": 5400,\n\t\"./vr.png\": 4281,\n\t\"./vr.svg\": 1018,\n\t\"./wave.png\": 461,\n\t\"./weave.png\": 4853\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7173;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _extends() {\n return (module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t {data.body} Coming Soon Error 404 We can’t find that page {\":'(\"} The page you’re looking for no longer exists. Return to the home page and remember: you haven’t seen anything. {data.name} {data.description} \n school \n Official Profile\n \n {data.body}\n {data.body} {data.body} ~ {funding} ~{funding} Address Indraprastha Institute of Information Technology Delhi Okhla Industrial Estate, Phase III (Near Govind Puri Metro Station) New Delhi, India - 110020 Contacts Socials {`scrollTop: ${scrollTop}`} {`scrollLeft: ${scrollLeft}`} Btech {yearSelected} {PageData.body} {data.name} {data.description}\n
\n
\n );\n}","import React from \"react\";\nimport speaker from \"../../assets/speaker.png\";\nimport '../../styles/landing.css'\n\n\nexport default function MissionAndVission({data}){\n return(\n <>\n
{data.heading}
\n \n\n
\n
\n
\n \n
\n {data.headingBlack}\n
\n \n {data.headingBold}\n
\n \n
}\n {wind.matches&&
}\n {wind.matches&&
}\n\n
\n
{data.heading}
\n {data.heading}
\n \n
\n
{data.title}
\n {data.subtitle}\n \n
\n
\n
{\n title.length==60?title:title.substring(0,60)\n }
\n {profName.substring(4,5).toUpperCase()}
\n {title.length === 60 ? title : title.substring(0, 60)}
\n {funding !== \"NA\" && (\n {profName.substring(4, 5).toUpperCase()}
\n \n \n \n
\n \n \n
\n \n \n
\n \n \n
\n {PageData.heading}\n
\n \n {bubbleSize>100&&\n <>\n
{name}
\n {details}\n {PageData.heading}
\n For more details please visit {PageData.redirect.text}
\n \n \n \n \n
\n