4 ms·
> In fact, Go is probably the only language that can claim to have a fully working Web server as part of its standard library. Seriously? Python has SimpleHTT
by chrismorgan 13y ago
> In fact, Go is probably the only language that can claim to have a fully working Web server as part of its standard library.
Seriously?
Python has SimpleHTTPServer to serve a directory plus the associated, less-well-known modules BaseHTTPServer (which SimpleHTTPServer is based on) and CGIHTTPServer, and wsgiref as the reference implementation of the WSGI interface, which makes it a fully-fledged web server.
And I find it impossible to believe that there would not be many more languages with a web server in their standard libraries.
- dragonwriter 13y ago> > In fact, Go is probably the only language that can claim to have a fully working Web server as part of its standard library. > Python has SimpleHTTPServer And Ruby has WEBrick. Erlang comes with one in the standard inets library. Racket has one, too, in the standard distribution (it doesn't actually use, that I am aware of, the "standard library" name, and given the structure of the documentation one might argue that the web server is outside of the standard library, but I'm not sure that is a significant distinction.) Web servers as part of the standard library or distribution are pretty common for languages these days.
- unoti 13y agoYou're right of course, but it bears mentioning that the way the Python web server is implemented, it cannot handle any significant load. It's not a "real" web server in the sense that it'd generally be a bad idea to try to use it for real work.
- trailfox 13y agoRuby has http://en.wikipedia.org/wiki/WEBrick http://en.wikipedia.org/wiki/WEBrick
- netghost 13y agoAnd Node most of of Node's standard lib is for its web server. Otherwise the articles more or less on point.
- coldtea 13y ago>Seriously? Python has SimpleHTTPServer to serve a directory plus the associated, less-well-known modules BaseHTTPServer (which SimpleHTTPServer is based on) and CGIHTTPServer, and wsgiref as the reference implementation of the WSGI interface, which makes it a fully-fledged web server. All of which is beside the point. Those servers are (even in the documentation) not suggested to be used in production. And they are not. Whereas Go's server serves thousands of requests per second in large deployments already. The only other I know of is perhaps Node. So, yes, seriously.
- deleted 13y ago[deleted]
- gizmo686 13y agoIsn't Node a JavaScript framework for webservers?
- nazka 13y agoNo, it's a platform (raw server).
- coldtea 13y agoWell, it's mostly THE way to use Javascript (or ECMAScript if you wish), the language, on the command line. As such, I consider it as much a platform as it also is a version of the Javascript language for the backend. Languages ARE platforms anyway -- we never care just about their core syntax and semantics but also for all the libs stuff they come with. So Python includes batteries, and Java includes the kitchen sync.
- pjmlp 13y agoA few more, Delphi , http://docwiki.embarcadero.com/Libraries/XE4/en/Web.HTTPApp.TWebModule http://docwiki.embarcadero.com/Libraries/XE4/en/Web.HTTPApp.... Java , http://docs.oracle.com/javase/7/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/package-summary.html http://docs.oracle.com/javase/7/docs/jre/api/net/httpserver/... .NET , http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx http://msdn.microsoft.com/en-us/library/system.net.httpliste... Erlang, http://erlang.org/doc/apps/inets/http_server.html http://erlang.org/doc/apps/inets/http_server.html
- munificent 13y agoDart: http://api.dartlang.org/docs/releases/latest/dart_io/HttpServer.html http://api.dartlang.org/docs/releases/latest/dart_io/HttpSer...
- tptacek 13y agoThe author of this blog post is wrong to so designate Golang, which obviously isn't the first development environment to be bundled with a production-caliber web server. But you're also wrong in suggesting that Python's built-in webservers are equivalent to Golang's. What's the largest deployed Python application that uses those servers? My understanding is that every deployed Golang app uses net/http.