ts in express code example
Example 1: express ts
import express = require('express');
// Create a new express application instance
const app: express.Application = express();
app.get('/', function (req, res) {
res.send('Hello World!');
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});
Example 2: express typescript
try this config for nodejs + typescript using babel
https://pastebin.com/TR4BXPqL