Code Monkey home page Code Monkey logo

Comments (5)

emgrasmeder avatar emgrasmeder commented on July 22, 2024 2

In the mean time, until the PR is closed, you can put Base.JLOptions().isinteractive==0 && wait() at the bottom of the program.

This should work:

using Mux

@app test = (
  Mux.defaults,
  page(respond("<h1>Hello World!!!!</h1>")),
  page("/about",
       probabilty(0.1, respond("<h1>Boo!</h1>")),
       respond("<h1>About Me</h1>")),
  page("/user/:user", req -> "<h1>Hello, $(req[:params][:user])!</h1>"),
  Mux.notfound())

serve(test)
Base.JLOptions().isinteractive==0 && wait()

from mux.jl.

amgad-naiem avatar amgad-naiem commented on July 22, 2024

@abannsunny This is fixed in #71 using fetch(serve(app, port))

from mux.jl.

abannsunny avatar abannsunny commented on July 22, 2024

Status C:\Users\abann\.julia\environments\v1.0\Project.toml
[c43c736e] Genie v0.1.0 #master (https://github.com/essenciary/Genie.jl)
[a975b10e] Mux v0.5.3
[f269a46b] TimeZones v0.8.0

using fetch(serve(app, 7777))

still exits out. Am I missing something? this is my code.

using Mux

@app test = (
  Mux.defaults,
  page(respond("<h1>Hello World!</h1>")),
  page("/about",
       probabilty(0.9, respond("<h1>Boo!</h1>")),
       respond("<h1>About Me</h1>")),
  page("/user/:user", req -> "<h1>Hello, $(req[:params][:user])!</h1>"),
  Mux.notfound())

  println("server started")


  fetch(serve(test, 7777))


from mux.jl.

amgad-naiem avatar amgad-naiem commented on July 22, 2024

@abannsunny PR not merged yet.

from mux.jl.

jpsamaroo avatar jpsamaroo commented on July 22, 2024

Fixed by #71 and #74 I believe.

from mux.jl.

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.