TBD54566975 / dwn-server

DWN server - host anywhere publicly accessible for DIDs to use
Apache License 2.0
40 stars 41 forks source link

introduce npx #94

Closed shamilovtim closed 10 months ago

shamilovtim commented 10 months ago

Reason for PR

On some of our CI we run Docker which takes a whopping 7 minutes on a macOS 12 runner. Setup of docker represents almost 50% of the entire time spent waiting on some CI runs. Yet many of our projects are already Javascript + npm environments that can run node binaries natively. We simply npx @web5/dwn-server and we're good to go. No Linux hypervisor necessary. Option for Docker will still be there for cases where it's necessary.

Implementation

Add support for npx with bin directive. See video for local run on my machine. Validated with npx link locally.

Video

https://github.com/TBD54566975/dwn-server/assets/3495974/3a51d4b8-f792-466f-b9c8-75e451dee9f5

codesandbox[bot] commented 10 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

codecov-commenter commented 10 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (02780d9) 80.90% compared to head (1f1706c) 80.81%.

Files Patch % Lines
src/main.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #94 +/- ## ========================================== - Coverage 80.90% 80.81% -0.09% ========================================== Files 15 15 Lines 1000 1001 +1 Branches 100 100 ========================================== Hits 809 809 - Misses 191 192 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.