Skip to content

chore(http): clean code - split controllers / middleware#90

Merged
fraxken merged 13 commits intoNodeSecure:v0.9.0from
tony-go:clean-http
Nov 26, 2021
Merged

chore(http): clean code - split controllers / middleware#90
fraxken merged 13 commits intoNodeSecure:v0.9.0from
tony-go:clean-http

Conversation

@tony-go
Copy link
Member

@tony-go tony-go commented Nov 20, 2021

Hi 👋

Few commit to clean the http-server module a bit.

  • split controllers
  • split middleware
  • use AsyncLocalStorage to share the path between them.

@tony-go tony-go marked this pull request as ready for review November 26, 2021 16:38
@tony-go
Copy link
Member Author

tony-go commented Nov 26, 2021

I finally, delete the spec test I added, found it useless.

WDYT? @antoine-coulon @fraxken

@tony-go tony-go changed the title chore(http): clean code - split controllers, add test chore(http): clean code - split controllers / middleware Nov 26, 2021
@fraxken fraxken merged commit 9ddcd7e into NodeSecure:v0.9.0 Nov 26, 2021
fraxken added a commit that referenced this pull request Dec 5, 2021
* chore: start impleting new NodeSecure back-end

* refactor: complete revamp of CLI commands

* chore: update NodeSecure dependencies

* refactor(lang): use new i18n.getLanguages method

* chore: setup scanner Logger and old tree walker Spinners

* chore: update @nodesecure/scanner (1.3.0 to 1.4.0)

* chore: update @nodesecure/flags (1.0.0 to 1.1.0)

* test: make it work with ESM

* fix: front-end build

* fix(httpServer): always open link when the server is listening

* fix: Emojis legend menu

* chore: update dependencies

* chore: debug on CLIUI

* ci: remove Node.js v12 and v15

* docs: update README

* refactor(startHTTPServer): add options object & add openLink option

* test: utils.js

* test(commands): add summary test

* refactor(test): use tape instead of jest

* fix: eslint V7+ issue

* chore: update dependencies

* chore: update @nodesecure/scanner (1.5.0 to 2.0.0)

* refactor: use @nodesecure/utils & enhance author management

* chore: update @nodesecure/flags (1.2.0 to 2.0.0)

* chore: update @nodesecure/scanner (2.0.1 to 2.1.0)

* chore: use flags v2 and new scanner flags

* refactor: use @nodesecure/vis-network

* refactor(http): clean code - split controllers / middleware (#90)

* chore(http): use http-server folder

* chore(http): move root route

* test(http): add first test

* chore: add updated package.json

* chore(http): finish root tests

* chore: create context (AsyncLocalStorage)

* feat(http): split data endpoint

* chore(http): port middleware in split file

* chore(http): remove useless spec test

* chore(http): fix naming for root import

* chore(http): add flags

* revert: remove sinon deps

* chore: add missing import comment

* fix: move bundlephobia call in the backend (#92)

* feat: add new routes and handle error

* fix: pass httpie error to polka

* feat: replace request

* fix: delete forgotten console.log

* revert: port context

* fix(bundle): support for org namespace

* chore: update dependencies

* chore(cli): fix few minor issues

Co-authored-by: Tony Gorez <gorez.tony@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants