hack-pad / hackpad

The in-browser IDE for Go
https://hackpad.org
Apache License 2.0
531 stars 37 forks source link

HTTP Server #17

Open ghost opened 3 years ago

ghost commented 3 years ago

Hey, did you know that you can intercept requests using service workers (in the web). And in this way make a virtual tcp server which can later be used for http servers

JohnStarich commented 2 years ago

That's a great idea. This is something I'd love for hackpad to have. If you're interested, we could discuss it a bit here.

The first question I have is, what do the Go syscalls look like for opening and running a network connection?

ghost commented 2 years ago

Hey, I am new to the go environment. I don't know how the syscalls look either. I guess you have to research a little bit.

JohnStarich commented 2 years ago

All good. I don't have the time to do the research right now, but I think it's worth doing đź‘Ť

If anyone wants to chime in with implementation ideas, feel free!

ghost commented 2 years ago

Hey, I actually started working on this.... do you think its better to use go or wasm or rust?

JohnStarich commented 2 years ago

@aether5896 Are you thinking of contributing it to Hackpad or is it for another project?

If for Hackpad, this project is in Go so that'd be my preference. For another project, I'm not certain – both Go and Rust seem capable. Rust's language support seems stronger right now, but I'm not sure if that's a significant difference for you.

ghost commented 2 years ago

@JohnStarich I am starting a new project because I was originally planning on a nodejs browser runtime... but thanks! I'll check out both... Rust is a bit hard to learn when you are getting into it but it has a better experience for wasm... I personally found go easier

ghost commented 2 years ago

And also if anyone else wants to help.. you can send dm me on discord @ aether.#6971