embeddedwebserver

Print something in PHP built-in web server

孤街醉人 提交于 2019-11-30 04:43:37
In python built-in web server when use print in function, it prints result in terminal ... for example: Django version 1.3.4, using settings 'parsicore.settings' Development server is running at http://0.0.0.0:8000/ Using the Werkzeug debugger (http://werkzeug.pocoo.org/) Quit the server with CONTROL-C. 127.0.0.1 - - [16/Jan/2013 02:02:08] "GET / HTTP/1.1" 200 - hello ... print 1 2 3 How can I print something like this in PHP built-in web server? for example I want print $_POST in terminal. I use php -S 127.0.0.1:3000 for run PHP built-in web server. The development web server built in to PHP

Setting environment variables with the built-in PHP web server

会有一股神秘感。 提交于 2019-11-30 04:20:47
PHP 5.4 supports a built-in web server for development purposes. The app we are developing is configured via environment variables. With Apache you'd do this: SetEnv FAVORITE_COLOR white With the normal CLI you can do this: $ export FAVORITE_COLOR=black $ php -a php > echo $_SERVER['FAVORITE_COLOR']; Is there a way to set these variables for the built-in web server? Looks like E is excluded from variable_order setting running the built-in server. If you add the E to the variable_order setting, it works: test.php <?php var_dump($_ENV['FOO']); shell: FOO=BAR php -d variables_order=EGPCS -S

Embedded (ASP.NET) web server [closed]

倾然丶 夕夏残阳落幕 提交于 2019-11-29 07:53:10
问题 I am looking for a light-web embeddable web server for .NET. I need it to fake a SOAP web-service for automated testing, so it is a big plus if it supports ASP.NET web-services or another easy way to create SOAP web-services. Extra bonus points for quick startup and shutdown and multiple simultaneous instances on different ports. A Google search turns up aspnetserve, www-Sharp.Runtime and Neokernel Web Server. Do anyone have any experience with those or other solutions? 回答1: You can try the

Is it possible to create a standalone, C# web service deployed as an EXE or Windows service?

喜欢而已 提交于 2019-11-29 05:33:52
Is it possible to create a C# EXE or Windows Service that can process Web Service requests? Obviously, some sort of embedded, probably limited, web server would have to be part of the EXE/service. The EXE/service would not have to rely on IIS being installed. Preferably, the embedded web service could handle HTTPS/SSL type connections. The scenario is this: customer wants to install a small agent (a windows service) on their corporate machines. The agent would have two primary tasks: 1) monitor the system over time and gather certain pieces of data and 2) respond to web service requests (SOAP

C/C++ - Any good web server library? [closed]

萝らか妹 提交于 2019-11-28 18:47:35
Are there any open source, fast web server libraries? Thanks. Alex B mongoose (formely shttpd , GPL v2 and commercial license), libmicrohttpd (LGPL v2.1 license). As far as I know, libevent has a great event-driven and lightweight http server header . If you want to play with the concept you can check this codproject article. You can also check this wikipedia article whcih compares major light weight embedded server. You can check AppWeb Http Server also. Take a look at Qt. I don't know if it's fast enough for you, but it has a nice network module. You also get SQL and XML modules, and a lot

How can I create an HttpListener class on a random port in C#?

对着背影说爱祢 提交于 2019-11-27 23:27:25
I would like to create an application that serves web pages internally and can be run in multiple instances on the same machine. To do so, I would like to create an HttpListener that listens on a port that is: Randomly selected Currently unused Essentially, what I would like is something like: mListener = new HttpListener(); mListener.Prefixes.Add("http://*:0/"); mListener.Start(); selectedPort = mListener.Port; How can I accomplish this? TcpListener will find a random un-used port to listen on if you bind to port 0. public static int GetRandomUnusedPort() { var listener = new TcpListener

Is it possible to create a standalone, C# web service deployed as an EXE or Windows service?

吃可爱长大的小学妹 提交于 2019-11-27 23:07:50
问题 Is it possible to create a C# EXE or Windows Service that can process Web Service requests? Obviously, some sort of embedded, probably limited, web server would have to be part of the EXE/service. The EXE/service would not have to rely on IIS being installed. Preferably, the embedded web service could handle HTTPS/SSL type connections. The scenario is this: customer wants to install a small agent (a windows service) on their corporate machines. The agent would have two primary tasks: 1)

Embedded Jetty looking for files inside its Jar file

烈酒焚心 提交于 2019-11-27 12:56:21
问题 I successfully embedded Jetty on a test application. It can serve files without issues. Now I want to know if it's possible for Jetty to serve files that are inside its own Jar file. Does anyone know if that's possible? 回答1: An example is listed on the Jetty embedding page at http://docs.codehaus.org/display/JETTY/Embedding+Jetty The trick is to create a File URL to your classpath location. String webDir = this.class.getClassLoader().getResource("com/company/project/mywebdir").toExternalForm(

C/C++ - Any good web server library? [closed]

落爺英雄遲暮 提交于 2019-11-27 11:49:40
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Are there any open source, fast web server libraries? Thanks. 回答1: mongoose (formely shttpd, GPL v2 and commercial license),

What are the limitations of the flask built-in web server

时间秒杀一切 提交于 2019-11-27 11:28:05
I'm a newbie in web server administration. I've read multiple times that flask built-in web server is not designed for "production", and must be used only for tests and debug... But what if my app touchs only a thousand users who occasionnaly send data to the server ? If it works, when will I have to bother with the configuration of a more sophisticated web server ? (I am looking for approximative metrics). In a nutshell, I would love to find what the builtin web server can do (with approx thresholds) and what it cannot. Thanks a lot ! There isn't one right answer to this question, but here