added - example file boilerplate
ADD
example/index.ts
+import * as http from 'http';
+
+const HOSTNAME = '127.0.0.1';
+const PORT = 1337;
+
+const server = http.createServer((req, res) => {
+ res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.end('Hello World\n');
+});
+
+server.listen(PORT, HOSTNAME, () => {
+ console.log(`Server running at http://${HOSTNAME}:${PORT}/`);
+});

MODIFY
package-lock.json
package-lock.json
"yallist": "2.1.2"
}
},
+ "make-error": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz",
+ "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==",
+ "dev": true
+ },
"makeerror": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz",
}
}
},
+ "ts-node": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.0.2.tgz",
+ "integrity": "sha512-H/KWK27B3JJAc5WFOBBUxN638DukbV8PptdQgiHWPO2SGDVJzuVOl8Ye0XJ5+FiZIdFtgUuGOJRV4c/XBQ5dBg==",
+ "dev": true,
+ "requires": {
+ "arrify": "1.0.1",
+ "chalk": "2.4.1",
+ "diff": "3.5.0",
+ "make-error": "1.3.4",
+ "minimist": "1.2.0",
+ "mkdirp": "0.5.1",
+ "source-map-support": "0.5.5",
+ "yn": "2.0.0"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "dev": true
+ }
+ }
+ },
"tsc": {
"version": "1.20150623.0",
"resolved": "https://registry.npmjs.org/tsc/-/tsc-1.20150623.0.tgz",
"dev": true
}
}
+ },
+ "yn": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",
+ "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=",
+ "dev": true
}
}
}

MODIFY
package.json
package.json
"start": "npm run watch",
"clean": "rimraf dist",
"build": "npm run clean && tsc",
+ "example": "ts-node example/index.ts",
"watch": "tsc -w",
"lint": "tslint --config tslint.json --project tsconfig.json --type-check",
"test": "NODE_ENV=test jest --expand",
"rimraf": "^2.6.2",
"supertest": "~3.0.0",
"ts-jest": "~22.4.4",
+ "ts-node": "^6.0.2",
"tsc": "~1.20150623.0",
"tslint": "~5.9.1",
- "typescript": "~2.8.3",
"typedoc": "~0.11.1",
"typedoc-plugin-external-module-name": "^1.1.1",
- "typedoc-plugin-internal-external": "^1.0.10"
+ "typedoc-plugin-internal-external": "^1.0.10",
+ "typescript": "~2.8.3"
}
}

added - example file boilerplate