Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.nyc_output/
build/
coverage/
node_modules/
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ docker-test-deps: docker-compose-deps
docker pull '$(test_image)'
docker pull '$(perf_test_image)'

node-deps: node_modules/
node-deps: build/ node_modules/

node_modules/: package.json
npm install

build/: node_modules/
npm run compile

docker:
docker build -t '$(DOCKER_IMAGE)' .

Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"description": "Life Event Verification API",
"main": "src/app.js",
"scripts": {
"start": "node .",
"start:dev": "NODE_ENV=development POSTGRES_DB=levdb POSTGRES_USER=lev POSTGRES_PASSWORD=lev POSTGRES_SSL=false nodemon -w src/ -w config.js .",
"start:dev-mock": "NODE_ENV=development MOCK=true nodemon -w src/ -w config.js -w mock/ .",
"compile": "tsc",
"start": "node build/src/app.js",
"start:dev": "NODE_ENV=development POSTGRES_DB=levdb POSTGRES_USER=lev POSTGRES_PASSWORD=lev POSTGRES_SSL=false nodemon -w src/ -w config.js -x ts-node .",
"start:dev-mock": "NODE_ENV=development MOCK=true nodemon -w src/ -w config.js -w mock/ -x ts-node .",
"test": "npm run test:cover && npm run test:check-coverage",
"test:unit": "mocha --reporter spec ./test/unit",
"test:cover": "nyc --all npm run test:unit && nyc report --reporter=html",
Expand Down Expand Up @@ -44,7 +45,9 @@
"nyc": "^11.8.0",
"proxyquire": "^2.0.1",
"sinon": "^5.0.10",
"sinon-chai": "^3.1.0"
"sinon-chai": "^3.1.0",
"ts-node": "^6.0.3",
"typescript": "^2.8.3"
},
"nyc": {
"include": [
Expand Down
23 changes: 23 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"allowJs": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"outDir": "./build",
"preserveConstEnums": true,
"removeComments": false,
"sourceMap": true,
"target": "es6"
},
"include": [
"./src/**/*",
"./test/**/*"
],
"exclude": [
"coverage",
"example-db",
"mock",
"node_modules",
"sql"
]
}