1
0
mirror of https://github.com/microsoft/TypeScript-Node-Starter.git synced 2026-03-23 13:12:12 +00:00

Update source and dependency to work with TypeScript 2.7. Closes #81

The commit brings compatibility with new features introduced in TypeScript 2.7.
The one with most impact on this project is ES6/ECMAScript module compatibility layer
added in 2.7 enabled in tsconfig.json for this project.
This allowed to rewrite source files to use shorted, better imports everywhere and
also use default exports.

To make project more aligned with updated TypeScript all the NPM depenendencies has been
updated making sure that everything works as expected and tests pass.

Thanks for the project!

Thanks!
This commit is contained in:
Peter Blazejewicz
2018-02-20 21:58:46 +01:00
parent dcb287e63d
commit 1b71586efa
15 changed files with 2423 additions and 1680 deletions

View File

@@ -1,6 +1,6 @@
import * as errorHandler from "errorhandler";
import errorHandler from "errorhandler";
const app = require("./app");
import app from "./app";
/**
* Error Handler. Provides full stack - remove for production
@@ -11,8 +11,12 @@ app.use(errorHandler());
* Start Express server.
*/
const server = app.listen(app.get("port"), () => {
console.log((" App is running at http://localhost:%d in %s mode"), app.get("port"), app.get("env"));
console.log(
" App is running at http://localhost:%d in %s mode",
app.get("port"),
app.get("env")
);
console.log(" Press CTRL-C to stop\n");
});
export = server;
export default server;