Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
https://www.npmjs.com/package/ts-node
Also read the discussion here: https://github.com/Microsoft/TypeScript/issues/1823
This is much easier to do than you might think. You execute in the console, for example, the following:
And write something like this code in app.ts:
import * as express from 'express';
const app: express.Aplication = new Express();
app.get('/hello', helloMessage);
function helloMessage(req: express.Request, res: express.Response) {
console.log("Hello!");
}
app.listen(8000)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question