a2svior
a2svior
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Deal 🤝
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
yes, perfect! Sorry, just saw this. Let me know if you have any other questions later 🙂
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Did you try out this example from the README? It should be possible to create e.g a static folder of your own, then use Mojo's filesystem functions, e.g read_bytes() to serve a file from that folder on a path. And then you could just refer to that file in your HTML. That's basically how the welcome example works https://github.com/Lightbug-HQ/lightbug_http?tab=readme-ov-file#serving-static-files
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Crazy! 😁
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Okay, so here the Printer service raises an exception at that point when a non-existent key is being accessed, and this "Failed to process request" is how we log these kinds of service errors for now. We might improve that in the future e.g by making the HTTPService return either a response or an error. For now I would suggest to put things that could throw into a try/except block so you could catch an process the errors in your handler when they happen
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Oh wow, does it work if you comment this out?
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Ah, true. I'll check out the article once more, will maybe borrow something for the README. It's been a while now 😅
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Glad you got it working! Actually you can use Lightbug's primitives, like Server, HTTPRequest, HTTPResponse, and the HTTPService trait, from anywhere in your code. lightbug.🔥 is just an example. So as long as you define some services with needed functionality somewhere in your code and start a server, e.g. with server.listen_and_serve(), it can be in any file in your repo
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Yup, just fixed the issue 20 minutes ago! Looks like a bug in rattler-build. That's what we get for using their binary from the latest release, haha. Pinned it to a version from a couple weeks ago, now it works. On the upside, was able to report the problem to maintainers so hopefully they can resolve it before it affects more people: https://github.com/prefix-dev/rattler-build/issues/1354
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
But hopefully you can test with 0.1.8 for now, unless you need UDP 🙂
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Hmm when I check here it looks like 0.1.9 wasn't published 🤔 https://prefix.dev/channels/mojo-community/packages/lightbug_http Looks like there was an error in the publishing CI job, but the job didn't fail for some reason, so I assumed everything was fine https://github.com/Lightbug-HQ/lightbug_http/actions/runs/12835368948/job/35794658728#step:3:1 Will fix that first thing tomorrow. Thanks for the catch!
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Yup, the PR to add Lightbug to modular-community is pending for now
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Lightbug 0.1.9 Release just dropped! This time with some bangers -- including a refactor of how the socket works (it's a struct now) + basic UDP support, both by @toasty ! Full changelog: - Introduce Socket and refactor connection caching by @thatstoasty in #86 - UDP Socket support by @thatstoasty in #87 https://github.com/Lightbug-HQ/lightbug_http/releases/tag/v0.1.9
118 replies
MModular
Created by samufi on 1/9/2025 in #community-showcase
Larecs: a performance-centred archetype-based ECS
Impressive 👏
16 replies
MModular
Created by duck_tape on 1/3/2025 in #community-showcase
A Benchmark with Files and Bytes
Today we learned that one should use Mojo on M chips and Rust on Intel for best performance 😁
24 replies
MModular
Created by duck_tape on 1/3/2025 in #community-showcase
A Benchmark with Files and Bytes
I also personally find the Mojo implementation more readable than either Rust or Python in this case
24 replies
MModular
Created by duck_tape on 1/3/2025 in #community-showcase
A Benchmark with Files and Bytes
Oh yeah, take that Rust! 🦀 🚒 :mojo:
24 replies
MModular
Created by 0x4a61636f62 on 1/1/2025 in #questions
Mojo for Building Applications or mostly Data Science?
Looks like @Ket is using Mojo with arch just fine , can maybe share advice
72 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
There were a couple issues with v0.1.6 so we shipped a hotfix release 0.1.7. Don't forget to update Lightbug's version in the dependencies section of your mojoproject.toml ! https://github.com/saviorand/lightbug_http/releases/tag/v0.1.7
118 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Lightbug 0.1.6 Release just dropped! Featuring many great improvements from @eggsquad and cookie support by @robin-schoch We also support Mojo 24.6 now 😄 The full changelog, same as on Github: - Keep persistent connections in client by @bgreni in #69 - add script for server benchmarking by @bgreni in #71 - Add support for chunked transfer encoding by @bgreni in #70 - Feature/47 cookie support by @robin-schoch in #74 - add integration test by @bgreni in #72 - Allow mutation in server-side service implementation by @bgreni in #76 - Catch exceptions from service handler and return internal error by @bgreni in #77 - bump to 24 6 by @saviorand in #78 https://github.com/saviorand/lightbug_http/releases/tag/v0.1.6
118 replies