Skip to content

Commit 063932b

Browse files
author
hirsch88
committed
House cleaning
1 parent a748051 commit 063932b

File tree

8 files changed

+153
-141
lines changed

8 files changed

+153
-141
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,11 @@ The port will be displayed to you as `http://0.0.0.0:3000` (or if you prefer IPv
7373
## License
7474
[MIT](/LICENSE)
7575

76+
## ToDo's
77+
https://blog.risingstack.com/10-best-practices-for-writing-node-js-rest-apis/
78+
[ ] Add api doc - http://apidocjs.com
79+
[ ] Add black box testing https://www.npmjs.com/package/supertest
80+
81+
7682
---
7783
Made with ♥ by Gery Hirschfeld ([@GeryHirschfeld1](https://twitter.com/GeryHirschfeld1)) and [contributors](https://github.com/w3tecch/express-typescript-boilerplate/graphs/contributors)

build/tasks/docs.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"install:dev": "yarn install && npm run install:typings",
99
"install:clean": "npm prune && ./node_modules/.bin/typings prune",
1010
"serve": "./node_modules/.bin/nodemon --watch 'src/**/*.ts'",
11-
"serve:debug": "./node_modules/.bin/nodemon --watch 'src/**/*.ts' --debug=6666",
11+
"serve:debug": "npm run serve -- --debug=6666",
1212
"lint": "./node_modules/.bin/gulp lint",
1313
"test": "NODE_ENV=test ./node_modules/.bin/jest --coverage",
1414
"build": "./node_modules/.bin/gulp build",
@@ -17,7 +17,6 @@
1717
"db:migrate": "./node_modules/.bin/knex migrate:latest",
1818
"db:migrate:rollback": "./node_modules/.bin/knex migrate:rollback",
1919
"db:seed": "./node_modules/.bin/knex seed:run",
20-
"db:refresh": "npm run db:drop && npm run db:migrate",
2120
"start": "node src/index.js"
2221
},
2322
"repository": "git+ssh://git@github.com/w3tec/express-typescript-boilerplate.git",
@@ -57,8 +56,6 @@
5756
"@types/express": "^4.0.35",
5857
"@types/faker": "^4.1.0",
5958
"@types/helmet": "0.0.34",
60-
"@types/inversify": "^2.0.33",
61-
"@types/inversify-express-utils": "^2.0.0",
6259
"@types/jest": "^19.2.2",
6360
"@types/knex": "0.0.47",
6461
"@types/lodash": "^4.14.63",
@@ -89,7 +86,6 @@
8986
"gulp-rename": "^1.2.2",
9087
"gulp-sourcemaps": "^1.9.1",
9188
"gulp-tslint": "^7.0.1",
92-
"gulp-typedoc": "^2.0.2",
9389
"gulp-typescript": "^3.1.4",
9490
"gulp-zip": "^3.2.0",
9591
"helmet": "^3.4.0",
@@ -101,6 +97,7 @@
10197
"knex": "^0.12.7",
10298
"lodash": "^4.17.4",
10399
"morgan": "^1.7.0",
100+
"mysql": "^2.13.0",
104101
"nodemon": "^1.11.0",
105102
"path": "^0.12.7",
106103
"pg": "^6.1.5",
@@ -113,7 +110,7 @@
113110
"ts-jest": "^19.0.11",
114111
"ts-node": "^2.0.0",
115112
"tslint": "^4.3.1",
116-
"typescript": "^2.2.1",
113+
"typescript": "^2.3.0",
117114
"typings": "^2.1.0",
118115
"winston": "^2.3.1"
119116
},

src/api/requests/UserCreateRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IsEmail, IsNotEmpty } from 'class-validator';
22
import { RequestBody } from '../../core/api/RequestBody';
33

44
/**
5-
* This class is used for create request. Create a new instance
5+
* This class is used for create request. Create a new instance
66
* with the json body and than call .validate() to check if
77
* all criteria are given
88
*

src/app.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import container from './container';
1717
* all your custom middlewares and routes
1818
*/
1919
const app = Bootstrap.getApp()
20-
2120
// Enabling the cors headers
2221
.options('*', cors())
2322
.use(cors())

tsconfig.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
{
22
"compilerOptions": {
3+
"target": "es6",
34
"module": "commonjs",
4-
"target": "es5",
55
"moduleResolution": "node",
6+
"sourceRoot": "src",
7+
"typeRoots": [
8+
"node_modules/@types"
9+
],
610
"sourceMap": true,
7-
"noUnusedLocals": true,
11+
"alwaysStrict": true,
12+
"strict": true,
813
"noUnusedParameters": false,
14+
"noImplicitAny": false,
915
"experimentalDecorators": true,
1016
"emitDecoratorMetadata": true,
11-
"strictNullChecks": true,
1217
"lib": [
13-
"es6",
18+
"es2017",
1419
"dom"
15-
],
16-
"noImplicitAny": false
20+
]
1721
},
1822
"filesGlob": [
1923
"typings/**/*.d.ts",

tslint.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
22
"rules": {
3+
"align": [
4+
true,
5+
"parameters"
6+
],
37
"class-name": true,
48
"comment-format": [
59
true
610
],
11+
"jsdoc-format": true,
712
"curly": true,
813
"eofline": true,
914
"forin": true,

0 commit comments

Comments
 (0)