This repository has been archived on 2026-05-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Web-Dev-Old/nodeJS/Learning/03/src/index.ts
2024-12-18 21:16:07 +00:00

26 lines
659 B
TypeScript

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}`);
});