mirror of
https://github.com/microsoft/TypeScript-Node-Starter.git
synced 2026-03-22 11:17:38 +00:00
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!
23 lines
437 B
TypeScript
23 lines
437 B
TypeScript
import errorHandler from "errorhandler";
|
|
|
|
import app from "./app";
|
|
|
|
/**
|
|
* Error Handler. Provides full stack - remove for production
|
|
*/
|
|
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(" Press CTRL-C to stop\n");
|
|
});
|
|
|
|
export default server;
|