I am working on a nodejs application in typescript in which I wrote the server.js file as fallow:
import express = require('express'); import mongoose = require('mongoose'); let app=express(); app.set('port', process.env.PORT || 3000);
I use gulp for traspile which generates js file as
define(["require", "exports", 'express'], function (require, exports, express) { var app = express(); app.set('port', process.env.PORT || 3000); // Set port to 3000 or the provided PORT variable /** * Start app */ app.listen(app.get('port'), function () { console.log("App listening on port " + app.get('port') + "!"); }); }); //
but when I run this file, then getting the definition of the error is not detected.
Please correct me if I am wrong.

source share