Skip to the content.

Express - Web Framework

Express web framework for Node.js

Installing

npm install -E express
npm install -D -E @types/express

Simple server

import express from 'express';

const app = express();
const PORT = 8000;
app.use(express.static('public'))
app.get('/rest', (_req, res) => res.send('Express + TypeScript Server'));
app.listen(PORT, () => {
    console.log(`⚡️[server]: Server is running at http://localhost:${PORT}`);
});