Skip to content

Commit

Permalink
Merge pull request #217 from stefanwalther/refactor/koa
Browse files Browse the repository at this point in the history
refactor: move to koa
  • Loading branch information
stefanwalther authored Jul 7, 2020
2 parents f016ed6 + fb10e42 commit c3dae20
Show file tree
Hide file tree
Showing 76 changed files with 601 additions and 423 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "eslint-config-space-single/esnext",
"rules": {
"require-atomic-updates": "off",
"no-warning-comments": "off"
}
}
4 changes: 2 additions & 2 deletions docs/routes.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Once the Http server is up and listening, the following routes can be used:
Once the Http server is up and listening, the following index can be used:

- `POST /v1/user/register/local`
- `POST /v1/verify-token`
- ...

All routes are documented using Swagger/OpenAPI:
All index are documented using Swagger/OpenAPI:

http://localhost:3010/api-docs
32 changes: 17 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"repository": "https://github.com/stefanwalther/auth-service",
"license": "MIT",
"author": "Stefan Walther",
"main": "./src/api/index.js",
"main": "src/index.js",
"scripts": {
"coverage": "nyc report",
"lint": "npm run lint:src && npm run lint:test",
Expand All @@ -20,8 +20,8 @@
"lint:src:fix": "eslint src --fix",
"lint:test": "eslint test",
"lint:test:fix": "eslint test --fix",
"start": "node ./src/api/index.js",
"start:watch": "nodemon ./src/api/index.js",
"start": "node src/index.js",
"start:watch": "nodemon src/index.js",
"test": "npm run test:unit && npm run test:integration && npm run coverage",
"test:integration": "export JWT_SECRET='My Secret' && nyc --reporter=lcov mocha './test/integration/**/*.spec.js' --require './test/mocha.conf.js' --timeout 6000 --exit",
"test:integration:watch": "export JWT_SECRET='My Secret' && npm run test:unit && nyc --reporter=lcov mocha './test/integration/**/*.spec.js' --require './test/mocha.conf.js' --reporter=min --timeout 6000 --watch",
Expand All @@ -34,35 +34,36 @@
}
},
"dependencies": {
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cors": "2.8.5",
"email-templates": "^7.0.5",
"express": "^4.17.1",
"express-initializers": "^0.0.1",
"express-jwt-permissions": "^1.3.3",
"express-result": "0.1.6",
"handlebars": "^4.7.6",
"helmet": "^3.23.3",
"glob": "^7.1.6",
"http-status-codes": "^1.4.0",
"jsonwebtoken": "^8.5.1",
"koa": "^2.13.0",
"koa-body": "^4.2.0",
"koa-combine-routers": "^4.0.2",
"koa-favicon": "^2.1.0",
"koa-helmet": "^5.2.0",
"koa-initializer": "^4.0.1",
"koa-json-error": "^3.1.2",
"koa-passport": "^4.1.3",
"koa-router": "^9.1.0",
"koa2-cors": "^2.0.6",
"lodash": "4.17.15",
"moment": "2.27.0",
"mongoose": "^5.9.21",
"mongoose": "^5.9.22",
"mongoose-beautiful-unique-validation": "^7.1.1",
"mongoose-connection-config": "0.2.5",
"nodemailer": "6.4.10",
"nodemailer-postmark-transport": "3.0.0",
"nodemailer-sendgrid-transport": "^0.2.0",
"nodemailer-sparkpost-transport": "^2.2.0",
"nodemon": "2.0.4",
"passport": "0.4.1",
"passport-jwt": "4.0.0",
"passport-local": "^1.0.0",
"read-pkg-up": "7.0.1",
"sammler-io-audit-logs": "0.0.4",
"sammler-nodelib-logger": "^0.2.4",
"serve-favicon": "^2.5.0",
"swagger-jsdoc": "4.0.0",
"swagger-ui-express": "4.1.4",
"winster": "0.2.14"
Expand All @@ -71,11 +72,12 @@
"chai": "4.2.0",
"codeclimate-test-reporter": "0.5.1",
"codecov": "3.7.0",
"eslint": "^7.3.1",
"eslint": "^7.4.0",
"eslint-config-space-single": "0.3.11",
"eslint-plugin-mocha": "7.0.1",
"husky": "4.2.5",
"mocha": "8.0.1",
"moment": "^2.27.0",
"nyc": "15.1.0",
"supertest": "4.0.2"
},
Expand Down
8 changes: 0 additions & 8 deletions src/api/config/initializers/body-parser.js

This file was deleted.

7 changes: 0 additions & 7 deletions src/api/config/initializers/compression.js

This file was deleted.

7 changes: 0 additions & 7 deletions src/api/config/initializers/cors.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/api/config/initializers/favicon.js

This file was deleted.

7 changes: 0 additions & 7 deletions src/api/config/initializers/helmet.js

This file was deleted.

11 changes: 0 additions & 11 deletions src/api/config/initializers/morgan.js.bak

This file was deleted.

10 changes: 0 additions & 10 deletions src/api/config/initializers/passport.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/api/config/initializers/port.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/api/config/initializers/routes.js

This file was deleted.

21 changes: 0 additions & 21 deletions src/api/config/routes-config.js

This file was deleted.

11 changes: 0 additions & 11 deletions src/api/middleware/auth-required.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/api/middleware/passport-strategy.jwt.js.bak

This file was deleted.

12 changes: 0 additions & 12 deletions src/api/modules/app-settings/app-settings.controller.js

This file was deleted.

53 changes: 0 additions & 53 deletions src/api/modules/health-check/health-check.routes.js

This file was deleted.

Loading

0 comments on commit c3dae20

Please sign in to comment.