express helloworld
This commit is contained in:
13
letsStart/src/app.ts
Normal file
13
letsStart/src/app.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import * as express from "express";
|
||||
|
||||
const app: express.Express = express();
|
||||
const port: number = 8000;
|
||||
|
||||
app.get("/", (req: express.Request, res: express.Response) => {
|
||||
console.log(req);
|
||||
res.send("Hello World!");
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Example app listening at http://localhost:${port}`);
|
||||
});
|
Reference in New Issue
Block a user