import express , { Express , Request , Response } from 'express' ; import bodyParser from 'body-parser' ; import helmet from 'helmet' ; import dotenv from 'dotenv' ; dotenv . config ( ) ; const PORT = process . env . PORT || 3000 ; const app = express ( ) ; app . use ( helmet ( ) ) ; app . use ( bodyParser . json ( ) ) ; app . use ( bodyParser . urlencoded ( { extended : true } ) ) ; app . get ( '/' , ( req , res ) => { res . send ( '<h1>Hello from the TypeScript world!</h1>' ) ; } ) ; app . listen ( PORT , ( ) => console . log ( `Running on ${ PORT } ⚡` ) ) ;