Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExpressJS Setup locally #4

Closed
3 tasks done
Type-Style opened this issue Jan 4, 2024 · 0 comments
Closed
3 tasks done

ExpressJS Setup locally #4

Type-Style opened this issue Jan 4, 2024 · 0 comments
Assignees
Labels
setup Operational Stuff
Milestone

Comments

@Type-Style
Copy link
Owner

Type-Style commented Jan 4, 2024

  • 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}`);
});
@Type-Style Type-Style added the setup Operational Stuff label Jan 4, 2024
@Type-Style Type-Style self-assigned this Jan 5, 2024
Type-Style added a commit that referenced this issue Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setup Operational Stuff
Projects
Archived in project
Development

No branches or pull requests

1 participant