Last active
May 21, 2019 08:23
-
-
Save thetminko/19300ffbf8696a1b5d47b03bc50e5273 to your computer and use it in GitHub Desktop.
es6-ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "es6-ts", | |
"version": "1.0.0", | |
"description": "", | |
"main": "server.js", | |
"scripts": { | |
"tsc": "tsc", | |
"start": "npm run tsc && node build/server.js", | |
"start-dev": "ts-node-dev --respawn --transpileOnly ./src/server.ts", | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"@types/express": "^4.16.1", | |
"express": "^4.17.0", | |
"ts-node-dev": "^1.0.0-pre.39", | |
"typescript": "^3.4.5" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es6", | |
"module": "commonjs", | |
"esModuleInterop": true, | |
"alwaysStrict": true, | |
"noImplicitAny": false, | |
"noImplicitReturns": true, | |
"experimentalDecorators": true, | |
"emitDecoratorMetadata": true, | |
"outDir": "build" | |
}, | |
"include": [ | |
"src/**/*.ts" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment