简单的 HTTP 服务器 +服务器端框架包

发布于 2025-01-03 12:58:30 字数 377 浏览 2 评论 0原文

我正在开发一些工具,其中之一要求您能够在任何文件夹中轻松创建网络服务器实例并以任何用户身份运行。像 NodeJS 这样简单的东西,但可以在多个平台上工作,并且与服务器端语言的集成快速而肮脏。

PHP 要求您设置 PHP + Apache。 Rails 需要 Ruby + Ruby Gems 和 Rails(这对于通常不使用命令行的人来说非常令人畏惧)。 NodeJS 很简单,但你需要从头开始构建一切。

基本上,最终用户能够做的事情是:

  1. 下载并解压该工具(其设置文件中包含网络服务器本身)并将所有内容放入一个目录中。

  2. 运行directory/start(这将以任何用户身份工作)。

有什么想法吗?

There are a few tools that I'm developing and one of them requires you to be able to easily create a webserver instance in any folder and run as any user. Something simple like NodeJS, but works with multiple platforms and has an quick and dirty integration with a server-side language.

PHP requires you to setup PHP + Apache. Rails requires Ruby + Ruby Gems and Rails (this is pretty daunting for someone who doesn't normally use a command line). NodeJS is simple, but you need to build everything from scratch.

Basically what the end user to be able todo is:

  1. download and extract the tool (which has the webserver itself contained within its setup files) and put everything into a directory.

  2. run directory/start (this will work as any user).

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

爱本泡沫多脆弱 2025-01-10 12:58:30

G-WAN 可以用来做到这一点,因为它不需要任何配置(下面的命令安装官方发行版):

 wget http://gwan.com/archives/gwan_linux64-bit.tar.bz2
 tar -xjf gwan_linux64-bit.tar.bz2
 cd gwan_linux64-bit
 sudo ./gwan

当然,您可以使用自己的包与您自己的 HTML 页面和 C、C++、Obj-C 或 Java压缩档案中的脚本。

免责声明:我参与了这个项目的开发。

G-WAN can be used to do that because it does not require any configuration (the commands below install the official distribution):

 wget http://gwan.com/archives/gwan_linux64-bit.tar.bz2
 tar -xjf gwan_linux64-bit.tar.bz2
 cd gwan_linux64-bit
 sudo ./gwan

Of course, you can use your own package with your own HTML pages and C, C++, Obj-C or Java scripts in the compressed archive.

Disclamer: I am involved in the development of this project.

别靠近我心 2025-01-10 12:58:30

在这种情况下,最好的解决方案是使用 sinatra 或 Java 编译的程序来生成 HTTP Web 服务器。其他所有内容都需要编译或安装到系统上,并且不支持服务器端编程语言。

The best solution in this case is to use something like sinatra or a Java-compiled program which spawns a HTTP web server. Everything else either needs to be compiled or installed onto the system and doesn't support a server-side programming language.

猫卆 2025-01-10 12:58:30

Mongoose 可以做你想做的事。它还附带包含 PHP 的捆绑包,因此只需单击一下即可完成所有操作。

Mongoose can do what you want. It also comes with the bundle that include PHP, so everything could be done in single click.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文