All Projects → yihui → Servr

yihui / Servr

A simple HTTP server in R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Servr

Embedio
A tiny, cross-platform, module based web server for .NET
Stars: ✭ 1,007 (+341.67%)
Mutual labels:  websocket, http-server
Mofuw
mofuw is *MO*re *F*aster, *U*ltra minimal *W*ebserver.
Stars: ✭ 107 (-53.07%)
Mutual labels:  http-server, web-server
Akka Http
The Streaming-first HTTP server/module of Akka
Stars: ✭ 1,163 (+410.09%)
Mutual labels:  websocket, http-server
Beetlex
high performance dotnet core socket tcp communication components, support TLS, HTTP, HTTPS, WebSocket, RPC, Redis protocols, custom protocols and 1M connections problem solution
Stars: ✭ 802 (+251.75%)
Mutual labels:  websocket, http-server
Zio Http
A scala library to write Http apps.
Stars: ✭ 162 (-28.95%)
Mutual labels:  websocket, http-server
Caddy
Matthew Holt began developing Caddy in 2014 while studying computer science at Brigham Young University. (The name "Caddy" was chosen because this software helps with the tedious, mundane tasks of serving the Web, and is also a single place for multiple things to be organized together.) It soon became the first web server to use HTTPS automatically and by default, and now has hundreds of contributors and has served trillions of HTTPS requests.
Stars: ✭ 35,966 (+15674.56%)
Mutual labels:  http-server, web-server
Restbed
Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.
Stars: ✭ 1,551 (+580.26%)
Mutual labels:  websocket, http-server
Facebooc
Yet another Facebook clone written in C
Stars: ✭ 483 (+111.84%)
Mutual labels:  http-server, web-server
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+1371.49%)
Mutual labels:  websocket, http-server
Fenix
A simple and visual static web server with collaboration features.
Stars: ✭ 1,559 (+583.77%)
Mutual labels:  http-server, web-server
Netcoreserver
Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Stars: ✭ 799 (+250.44%)
Mutual labels:  websocket, http-server
Mojo
✨ Mojolicious - Perl real-time web framework
Stars: ✭ 2,298 (+907.89%)
Mutual labels:  websocket, web-server
Cowboy
Small, fast, modern HTTP server for Erlang/OTP.
Stars: ✭ 6,533 (+2765.35%)
Mutual labels:  websocket, http-server
Jiny
Lightweight, modern, simple JVM web framework for rapid development in the API era
Stars: ✭ 40 (-82.46%)
Mutual labels:  websocket, http-server
Cppserver
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Stars: ✭ 528 (+131.58%)
Mutual labels:  websocket, http-server
T Io
解决其它网络框架没有解决的用户痛点,让天下没有难开发的网络程序
Stars: ✭ 1,331 (+483.77%)
Mutual labels:  websocket, http-server
Binserve
A blazingly fast static web server with routing, templating, and security in a single binary you can set up with zero code. ⚡️🦀
Stars: ✭ 401 (+75.88%)
Mutual labels:  http-server, web-server
Hydra
后端一站式微服务框架,提供API、web、websocket,RPC、任务调度、消息消费服务器
Stars: ✭ 407 (+78.51%)
Mutual labels:  websocket, http-server
Hummingbird
Lightweight, flexible HTTP server framework written in Swift
Stars: ✭ 114 (-50%)
Mutual labels:  http-server, web-server
Catacumba
Asynchronous web toolkit for clojure built on top of Ratpack / Netty
Stars: ✭ 192 (-15.79%)
Mutual labels:  http-server, web-server

servr

R-CMD-check CRAN release

A simple HTTP server to serve files under a given directory based on the httpuv package.

You can install this package from CRAN (stable version) or XRAN (development version):

install.packages('servr')  # stable version; use a CRAN mirror, or
install.packages('servr', repos = 'https://xran.yihui.org')  # devel version

This package is licensed under GPL.

Serve static files

To some degree, this package is like python -m SimpleHTTPServer or python -m http.server. It may be used to serve:

You can either run servr::httd() in an interactive R session, or run from command line:

# default: port 4321, do not launch browser
Rscript -e "servr::httd()"

# open a web browser
Rscript -e "servr::httd()" -b

# listen on port 4000
Rscript -e "servr::httd()" -p4000

# pass arguments to the httd() function
Rscript -e "servr::httd(,4000,TRUE)"

There is also a shell script under system.file('bin', package = 'servr'); if it is added to PATH, you can simply run

servr  # serve the current directory
servr -b  # launch the browser
servr -b -p4000  # change port to 4000

Serve and watch a directory

Similar to httd(), the function httw() can both serve and watch a directory. If you are viewing an HTML file in the browser, it will be automatically refreshed whenever there are any changes in the directory (e.g. you added, deleted, or modified certain files in the directory).

Serve dynamic documents

Besides httd(), there are functions jekyll(), rmdv1(), and rmdv2() in this package to serve HTML files generated from R Markdown documents (via knitr or rmarkdown). R Markdown documents can be automatically re-compiled when their HTML output files are older than the corresponding source files, and HTML pages in the web browser can be automatically refreshed accordingly, so you can focus on writing R Markdown documents, and results will be updated on the fly in the web browser. This is even more useful when you write R Markdown documents in the RStudio IDE, because the HTML files are displayed in the RStudio viewer pane, and you can put the source document and its output side by side.

Jekyll with servr and knitr

Serve package vignettes

The function vign() can be used to serve R Markdown/HTML package vignettes. The HTML output files are generated and displayed in the web browser so you can preview the vignettes, and they will be cleaned up after they are loaded in the web browser to make sure your source package is clean.

Daemonized server

All server functions can be used in the daemonized mode, i.e., they can be non-blocking in the R session, which allows you to continue working in the R console after the server is launched. This mode can be set via the argument daemon = TRUE in most server functions. See ?server_config for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].