You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
refactor: decouple HTTP servers from cli/commands/daemon (#1950)
* refactor: decouple HttpApi from cli/commands/daemon
In the past API was exposed via HTTP Server only when jsipfs daemon was run
from the commandline, so src/http/index.js was also responsible for
orchestration that is not related to HTTP itself.
This refactor moves code that is not related to HTTP Servers into
standalone-daemon.js, which is easier to reason about, and unlocks use
of HttpApi in contexts other than commandline jsipfs daemon,
such as Firefox with libdweb or Chromium-based web browser with chrome.sockets APIs.
Refs.
ipfs/ipfs-companion#664
License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
* fix: print HTTP listeners only when run as daemon
This changes behavior in web browser. Instead of printing to
console.log, it uses proper debug-based logger.
Old behavior in terminal (when run via `jsipfs daemon`) does not change.
License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
* test: use StandaloneDaemon in test/http-api,gateway
This replaces durect use of HttpApi with StandaloneDaemon, restoring all
existing tests to operational state.
License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
* refactor: rename StandaloneDaemon to Daemon
License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
0 commit comments