Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akash yadav - Meeting Application #4

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Secret file containing Config Info
config.js
23 changes: 23 additions & 0 deletions Intro/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>

</head>
<body>
<h3>Hello From Heading </h3>
<button id="btn" onclick="handleClick()">Click</button>
<script>
function handleClick() {
document.querySelector("h3").style.color=randomColors()
}
function randomColors() {
return '#' + Math.floor(Math.random() * 16777215).toString(16);
}
</script>

</body>
</html>
44 changes: 44 additions & 0 deletions NodeJS/ExpressServer/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const express = require('express')
const app = express()
const port = 9090

//**********Server Configuration

app.use(
express.urlencoded({
extended: true
})
)

app.use(express.json())

app.listen(port, ()=>{
console.log("Express Server is up and running on port 9090")
})

//**********Server Code

var users = ['Alice','Bob','Candice','Duke']

app.get("/", (request,response)=>{
response.send("Thanks for calling Express Server")
})

app.get("/users", (request,response)=>{
response.send({users})
})

app.get("/check", (request,response)=>{
var idx = users.findIndex(element => element == request.body.username)
if(idx >= 0){
response.send(true)
} else {
response.send(false)
}
})

app.post("/add-user", (request,response)=>{
console.log("Adding user : " + request.body.username)
users.push(request.body.username)
response.send({"Response" : "User added successfully"})
})
1 change: 1 addition & 0 deletions NodeJS/ExpressServer/node_modules/.bin/is-ci

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions NodeJS/ExpressServer/node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions NodeJS/ExpressServer/node_modules/.bin/nodemon

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions NodeJS/ExpressServer/node_modules/.bin/nodetouch

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions NodeJS/ExpressServer/node_modules/.bin/nopt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions NodeJS/ExpressServer/node_modules/.bin/rc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions NodeJS/ExpressServer/node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading