zoom : project setup
This commit is contained in:
1
zoom/.gitignore
vendored
Normal file
1
zoom/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/node_modules
|
||||||
3
zoom/babel.config.json
Normal file
3
zoom/babel.config.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"presets": ["@babel/preset-env"]
|
||||||
|
}
|
||||||
4
zoom/nodemon.json
Normal file
4
zoom/nodemon.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"ignore": ["src/public/*"],
|
||||||
|
"exec": "babel-node src/server.js"
|
||||||
|
}
|
||||||
8748
zoom/package-lock.json
generated
Normal file
8748
zoom/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
zoom/package.json
Normal file
20
zoom/package.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "zoom",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Zoom clone using NodeJS, WebRTC, WebSockets",
|
||||||
|
"license": "MIT",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "nodemon"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/cli": "^7.15.7",
|
||||||
|
"@babel/core": "^7.15.5",
|
||||||
|
"@babel/node": "^7.15.4",
|
||||||
|
"@babel/preset-env": "^7.15.6",
|
||||||
|
"nodemon": "^2.0.13"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.17.1",
|
||||||
|
"pug": "^3.0.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
zoom/src/public/js/app.js
Normal file
1
zoom/src/public/js/app.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
alert("hello")
|
||||||
13
zoom/src/server.js
Normal file
13
zoom/src/server.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import express, { application } from "express";
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
app.set("view engine", "pug");
|
||||||
|
app.set("views", __dirname + "/views");
|
||||||
|
|
||||||
|
app.use("/public", express.static(__dirname + "/public"));
|
||||||
|
|
||||||
|
app.get("/", (req, res) => res.render("home"));
|
||||||
|
app.get("/*", (req, res) => res.redirect("/"));
|
||||||
|
const handleListen = () => console.log(`Listening on http://localhost:3000`);
|
||||||
|
app.listen(3000, handleListen);
|
||||||
16
zoom/src/views/home.pug
Normal file
16
zoom/src/views/home.pug
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
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")
|
||||||
|
|
||||||
|
link(rel="stylesheet", href="https://unpkg.com/mvp.css")
|
||||||
|
title Zooom
|
||||||
|
body
|
||||||
|
header
|
||||||
|
h1 Zooom!
|
||||||
|
main
|
||||||
|
h2 Welcome to Zooom
|
||||||
|
|
||||||
|
script(src="/public/js/app.js")
|
||||||
Reference in New Issue
Block a user