lesson 3 and 4

This commit is contained in:
2024-12-18 21:16:07 +00:00
parent eb7388e325
commit 966930753b
22 changed files with 6978 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import dotenv from 'dotenv';
dotenv.config({ path: `${__dirname}/../.env` });
import express from 'express';
const app = express();
const port = process.env.PORT || 3000; //usually above >1000 is unoccupied
//ftp: 21
//http: 80 (common practice to use those numbers) (standard website, but scamming)
//https: 443
//GET, POST, PUT, DELETE (standard protocols)
//GET = Read (get data from website and send back)
//POST = Create
//PUT = Update
//DELETE
app.get(`/`, (req, res) => {
res.send("Tiffany's Website is under Construction. Come back later.");
});
app.listen(port, () => {
console.log(`Server is running on http://localhost:${port}`);
});