hackpad icon indicating copy to clipboard operation
hackpad copied to clipboard

HTTP Server

Open ghost opened this issue 4 years ago • 7 comments

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

ghost avatar Sep 30 '21 12:09 ghost

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?

JohnStarich avatar Oct 11 '21 04:10 JohnStarich

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.

ghost avatar Oct 11 '21 10:10 ghost

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!

JohnStarich avatar Oct 17 '21 04:10 JohnStarich

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

ghost avatar Oct 01 '22 09:10 ghost

@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.

JohnStarich avatar Oct 02 '22 20:10 JohnStarich

@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 avatar Oct 03 '22 05:10 ghost

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

ghost avatar Oct 03 '22 05:10 ghost