Skip to content

ExpressJS Setup locally #4

@Type-Style

Description

@Type-Style
  • install express
    npm install express
  • install types
    npm install --save-dev @types/express
  • try small demo
import express from 'express';
import { Request, Response } from 'express';

const app = express();
const port = 3000;

app.get('/', (req: Request, res: Response) => {
  res.send('Hello TypeScript and Node.js!');
});

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}`);
});

Metadata

Metadata

Assignees

Labels

setupOperational Stuff

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions