26 lines
659 B
TypeScript
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}`);
|
|
});
|
|
|