Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: remove port requirement, permit running on paths #680

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

Scrxtchy
Copy link
Contributor

Unrestricts types when using settings values via CLI, permitting users to use otherwise unused code to run the server while listening to a path.

By setting yarg's type of the floodServerPort to a string, the support is maintained to respect a number value through the NormalisePort function, if the user supplies a number, it is treated as a number despite being of a string type.

I've added a process.on('exit') check to the web server, as if you don't properly close the listen server on a socket, the socket is never cleaned up and is regarded still in use on the next startup

Related Issue

closes #679

Screenshots

image
flood running behind an nginx proxy via proxy_pass http://unix:/home/scratch/flood/flood.sock;

Types of changes

  • Breaking change (changes that break backward compatibility of public API or CLI - semver MAJOR)
  • New feature (non-breaking change which adds functionality - semver MINOR)
  • Bug fix (non-breaking change which fixes an issue - semver PATCH)

@jesec jesec enabled auto-merge (squash) November 4, 2023 08:17
@jesec
Copy link
Owner

jesec commented Nov 4, 2023

LGTM!

Copy link

codecov bot commented Nov 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (master@713b1d9). Click here to learn what that means.

❗ Current head bf28e78 differs from pull request most recent head a73b515. Consider uploading reports for the commit a73b515 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #680   +/-   ##
=========================================
  Coverage          ?   77.09%           
=========================================
  Files             ?       61           
  Lines             ?    11313           
  Branches          ?     1284           
=========================================
  Hits              ?     8722           
  Misses            ?     2577           
  Partials          ?       14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

auto-merge was automatically disabled November 4, 2023 14:09

Head branch was pushed to by a user without write access

@Scrxtchy
Copy link
Contributor Author

Scrxtchy commented Nov 4, 2023

ran npx prettier -w server/bin/web-server.ts, lol :shipit:

@trim21 trim21 enabled auto-merge (squash) November 29, 2023 07:29
@trim21 trim21 merged commit 9fabf41 into jesec:master Nov 29, 2023
10 checks passed
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.

Unable to start Flood on a unix socket
3 participants