This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Chat app</title> | |
<!-- load Socket.io library --> | |
<script | |
src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/3.1.1/socket.io.js" | |
integrity="sha512-oFOCo2/3DtjrJG4N27BjSLQWoiBv171sK6a+JiWjp/7agxC2nCUP358AqzxkBUb5jX8g6CYLPdSKQTbC0weCwA==" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); | |
var fs = require("fs"); | |
var path = require("path"); | |
const APP_PORT = process.env.APP_PORT || 3000; | |
const app = http.createServer(requestHandler); | |
app.listen(APP_PORT); | |
console.log(`🖥 HTTP Server running at ${APP_PORT}`); | |
// handles all http requests to the server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: #f3f2f3; | |
margin: 0; | |
padding: 0; | |
} | |
header { | |
text-align: center; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var firebaseConfig = { | |
apiKey: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
authDomain: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
databaseURL: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
projectId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
storageBucket: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
messagingSenderId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
appId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var firebaseConfig = { | |
apiKey: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
authDomain: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
databaseURL: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
projectId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
storageBucket: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
messagingSenderId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
appId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var firebaseConfig = { | |
apiKey: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
authDomain: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
databaseURL: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
projectId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
storageBucket: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
messagingSenderId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
appId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx", | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Firebase RealTime Chat</title> | |
<link rel="stylesheet" href="./index.css"> | |
</head> | |
<body> | |
<header> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Firebase RealTime Chat</title> | |
<link rel="stylesheet" href="./index.css"> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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>Chat App with Vanilla JS</title> | |
<link rel="stylesheet" href="/css/styles.css" /> | |
<script | |
defer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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>Login</title> | |
<link rel="stylesheet" href="/css/styles.css" /> | |
<script | |
defer |