UNPKG

@wuchuheng/express

Version:
17 lines (12 loc) 398 B
import express, { Express, Request, Response } from 'express'; import dotenv from 'dotenv'; // Load environment variables dotenv.config(); const app: Express = express(); const port = process.env.PORT || 3000; app.get('/', (req: Request, res: Response) => { res.send('Hello, TypeScript Express!'); }); app.listen(port, () => { console.log(`Server running at http://localhost:${port}`); });