Giter Club home page Giter Club logo

Comments (5)

aravindavk avatar aravindavk commented on June 2, 2024 2

It works if public_folder function is used instead of setting in config. Will try to dig more and get the exact reason for this. For now you can try

require "kemal"

IP = "127.0.0.1"
PORT = 8081

Kemal.config.port = (ENV["PORT"]? || PORT).to_i
Kemal.config.host_binding = ENV["HOST_BINDING"]? || "#{IP}"
# Kemal.config.env = "production"

public_folder "dist"

Kemal.run do |config|
  # other configs ...
end

from kemal.

mamantoha avatar mamantoha commented on June 2, 2024 1

Hi @serge-hulne . Please re-open the issue. It's just a workaround.

This code is not working as expected::

Kemal.run do |config|
  config.public_folder = "dist"
end

The original issue can be fixed in Kemal by placing yield config right above config.setup here:

https://github.com/kemalcr/kemal/blob/master/src/kemal.cr#L32-L47

/cc @aravindavk

from kemal.

mamantoha avatar mamantoha commented on June 2, 2024 1

@aravindavk nope. Please check if it actually fixes the issue. Because I'm not sure. And create PR. Thanks.

from kemal.

serge-hulne avatar serge-hulne commented on June 2, 2024

Thank you!

from kemal.

aravindavk avatar aravindavk commented on June 2, 2024

The original issue can be fixed in Kemal by placing yield config right above config.setup here:

Thanks for the pointer. Are you planning to send the fix, or shall I send?

from kemal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.