How to use CGI in a web server on Repl
This isn't associated with any specific programming language, although I'm planning to use C++ with CGI, if you care to know.
Is it possible to use CGI on a web server on Repl.it? If so, how? Can anyone set up a basic example? My major problem is that I don't know how to do this on Repl.it, as opposed to my personal computer, although, I've yet to do this at all.
Is this possible using a NodeJS Repl?
I have found a Node JS CGI extension, but it uses JavaScript, so it's not just running an executable. Thus it was as useful as EJS, if not less.
I was going to attempt to eventually create a C++ server, would it be possible to do this without going though an extreme amount of work?
@SixBeeps Does Django allow CGI? which other frameworks allow this?
@JadenGarcia Ok, I misread the Wikipedia article and didn't realize it was a specification not an idea.
Django does have some kind of CGI support, but I don't know if it'll work or not. Your only choice is to try it yourself.
C++ has cgicc. Don't know if that's what you need, but it's there.
Any reason why you want to use CGI?
@SixBeeps Creating a dynamic web page. PHP isn't an option, we need it to be fast and capable of supporting a heavy load, so I was thinking about using C++'s multi-threading.
@SixBeeps I have an idea of how to code the web page, after doing hours of research, but I am lost as to how to set up a web server capable of supporting this on Repl.
@JadenGarcia PHP isn't fast and strong enough?
@SixBeeps No? Also, I'm more familiar with C++. Eventually I'll attempt to make a whole C++ server, so it's best to keep everything in one language?
You have to agree with keeping as few different languages as possible, right?
@JadenGarcia That's fair, but also like baking a cake over a bonfire. Sure, you might be used to building them, but the oven is not hard to learn at all, and you'll find it a heck of a lot more efficient to use something meant for making cakes.
You're not even restricted to using PHP. I mentioned Django (which is a Python framework), but there's also things like Node (haven't used it before, but there's quite a bit of content surrounding it here).
@SixBeeps I'm familiar with Node, and it has what I need, but I'm looking for lower level control of what my program does. Also, once again speed, Python and JavaScript are both too slow, although I do know that Python can use multiple threads. I'm honestly familiar with Python Node, and PHP to a certain degree.
@JadenGarcia TBH if these languages are too slow or not flexible enough, you're doing something wrong. A lot of existing projects are written in them, so I don't see how they are the limiting factor.
@SixBeeps Okay okay... it's just preference, which is totally subjective.
@JadenGarcia preference or not, you are REALLY better off using javascript or some other higher-level backend language(maybe one that supports true multithreading?) instead of C++
Also from what im reading on CGI, it can be slower than just doing it without CGI. As the server has to make new processes for the programs
@CSharpIsGud But I'm already doing so well! Check it out yourself: https://repl.it/@JadenGarcia/CGI.
@JadenGarcia wew that is some really hard to read C++
I do like what you did with the html though.
and still, if you can do it without cgi you probably should
@CSharpIsGud Oh yeah, I worked from easily readable to anything but readable. Honestly I need a better way to do the Tag()
nesting. I'm in the middle of redesigning it.
Hi,
Try using this repl: https://repl.it/@programmeruser/python-cgi-server
@xxpertHacker did this answer your question?