DannyBen / madness

Instant Markdown Server
https://madness.dannyb.co
MIT License
128 stars 19 forks source link

Settings cannot take effect #145

Closed softcup closed 1 year ago

softcup commented 1 year ago

The port and bind cannot take effect from .madness.yml

(base) user docs % madness -v
1.1.0
(base) user docs % madness config show
                path:  .
                port:  3001  <-
                bind:  127.0.0.1  <-
            base_uri:  ~
             sidebar:  true
             auto_h1:  ~
            auto_nav:  ~
            auto_toc:  true
         highlighter:  true
           copy_code:  true
          shortlinks:  ~
                 toc:  ~
               theme:  ~
                open:  ~
                auth:  ~
           auth_zone:  Restricted Documentation
   expose_extensions:  ~
             exclude:  ["^[a-z_\\-0-9]+$"]

Values in blue loaded from .madness.yml
(base) user docs % madness server
▌ starting server
▌ env    : production
▌ listen : 0.0.0.0:3000  <-
▌ path   : /Users/user/docs
▌ config : .madness.yml

== Sinatra (v3.0.4) has taken the stage on 3000 for development with backup from Puma
Puma starting in single mode...
* Puma version: 6.1.1 (ruby 3.2.0-p0) ("The Way Up")
*  Min threads: 0
*  Max threads: 5
*  Environment: development
*          PID: 21842
* Listening on http://0.0.0.0:3000  <-
Use Ctrl-C to stop
^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2023-03-09 22:43:36 +0800 ===
- Goodbye!
== Sinatra has ended his set (crowd applauds)
DannyBen commented 1 year ago

Thanks for this report. This seems to be broken since 1.0.0. Version 0.9.9 does not have this problem.

I will fix it and add the proper specs to prevent it from being an issue, this should have been covered in tests already, I dropped the ball.

Expect a fixed release within 1-2 days.

DannyBen commented 1 year ago

Version 1.1.1 released both to rubygems and docker. Thanks again for the report.

softcup commented 1 year ago

Thanks