spl0k / supysonic

Supysonic is a Python implementation of the Subsonic server API.
https://supysonic.readthedocs.io
GNU Affero General Public License v3.0
260 stars 57 forks source link

change launch method #204 #205

Closed vincentDcmps closed 3 years ago

vincentDcmps commented 3 years ago

following issue #204 and since we launch daemon as a module, I think it will be interesting to change the launch method of supysonic this modification allows to add a new entry point to launch supysonic

codecov[bot] commented 3 years ago

Codecov Report

Merging #205 (c018654) into master (f8018b2) will increase coverage by 0.05%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #205      +/-   ##
==========================================
+ Coverage   88.47%   88.53%   +0.05%     
==========================================
  Files          35       35              
  Lines        3358     3358              
==========================================
+ Hits         2971     2973       +2     
+ Misses        387      385       -2     
Impacted Files Coverage Δ
supysonic/covers.py 84.31% <0.00%> (+3.92%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f8018b2...c018654. Read the comment docs.

pR0Ps commented 3 years ago

Speaking only as a user, if a command for launching the server in a non-production capacity is added, I'd personally prefer it to be something like supysonic-debug-server so it doesn't confuse new users (and me in 6 months when I forget about all this).

spl0k commented 3 years ago

I can't accept this, at least in its current state. To quote Flask's documentation, Flask’s built-in server is not suitable for production. The server.py file you copied for the new command is running this built-in server and as such isn't recommended in a production environment. While keeping the ability to run a development server could be useful for people knowing what they're doing and the limitations, it shouldn't be advertised as the main entry point. I'm aware supysonic doesn't provide a proper out-of-the-box alternative to this dev server. I'll try to of something, possibly without tying it to a specific implementation (as I'd like the users to still be able to choose their preferred deployment option).