Skip to content

Commit

Permalink
Vercel Startup
Browse files Browse the repository at this point in the history
  • Loading branch information
larsdekooter committed Oct 1, 2022
1 parent 4b9f565 commit e4d0489
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!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>UtilBot</title>
</head>
<body></body>
</html>
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class Interaction {
}
}
const app = express();
app.get("/", (req, res) => res.send("Here I am"));
app.use(express.static("./Public"));

app.get("/", (req, res) => res.sendFile("index.html", { root: "." }));
app.get(
"/inter",
verifyKeyMiddleware(
Expand All @@ -34,6 +36,7 @@ app.get(
}
}
);

function calculateGravity(
r = 6.4e6, //6,4 * 10⁶
G = 6.67e-11, //6,67 * 10⁻¹¹
Expand All @@ -43,4 +46,5 @@ function calculateGravity(
const Fz = (G * M) / pow(r, 2); // Fz === Fg = mg === G * (mM / r²) = g ==== G * (M / r²);
return Fz;
}

app.listen(3000, () => console.log("seeya"));
14 changes: 14 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"builds": [
{
"src": "index.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "index.js"
}
]
}

1 comment on commit e4d0489

@vercel
Copy link

@vercel vercel bot commented on e4d0489 Oct 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

utilbot – ./

utilbot.vercel.app
utilbot-git-master-larsdekooter.vercel.app
utilbot-larsdekooter.vercel.app

Please sign in to comment.