Photo by Michal Matlon

Streaming HTTP Response Output in OpenResty

In this video, I’ll demonstrate how to do streaming HTTP response body output in OpenResty. cd ~/ mkdir stream-resp/ cd stream-resp/ We create the sub-directory structure as always. Read more...

Photo by Andrik Langfield

Timing Lua Code Correctly in OpenResty

This tutorial demonstrates both the right ways and wrong ways of benchmarking user Lua code in OpenResty. cd ~ mkdir time-lua cd time-lua/ First of all, make sure our CPU is always at its full speed. Read more...

Photo by Cristina Gottardi

Lookup OpenResty Documentation on Terminal with restydoc

This tutorial demonstrates how to use OpenResty’s restydoc command-line utility to quickly lookup OpenResty documentation for Nginx modules, Nginx configuration directives, Lua API functions, Lua C functions, Lua modules, and many more. Read more...

Photo by Gautam Ganguly

Share Data Across Requests Served by OpenResty

This tutorial will demonstrate how to share data across different HTTP requests served by an OpenResty application. cd ~/ mkdir data-share cd data-share/ mkdir conf logs lua tree We first prepare our test application’s directory tree. Read more...

Photo by Yichun Zhang

Install OpenResty on CentOS 8 via dnf

This tutorial will demonstrate how to install OpenResty on CentOS 8 via dnf. We’ll use this fresh install of CentOS 8 in this tutorial. Read more...

Photo by Markus Spiske & Yichun Zhang

The resty Command-Line Utility Demo

In this tutroial, we will demonstrate how to use the resty command-line utility shipped with OpenResty. cd ~ export PATH=/usr/local/openresty/bin:$PATH which resty It’s usually in this path. Read more...

Photo by Gerry Roarty

Write Your Own Lua Modules for OpenResty Applications

Today I’d demonstrate how to write your own Lua modules in your OpenResty applications, step by step. Let’s put our simple OpenResty application in a new directory named test-module. Read more...