Skip to content

Add debug/administration website for ngx_lua_cpp#1

Merged
paintdream merged 2 commits intomasterfrom
copilot/create-debug-administration-website
Mar 26, 2026
Merged

Add debug/administration website for ngx_lua_cpp#1
paintdream merged 2 commits intomasterfrom
copilot/create-debug-administration-website

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

OpenResty-based debug console for executing Lua code interactively and viewing server logs. All files in web/.

web/nginx.conf

  • API endpoints: /api/exec (POST, runs Lua code), /api/logs (GET, tail log files), /api/logs/clear, /api/info
  • Lua execution sandbox with print() capture and return value display
  • Log reading via pure Lua file I/O (no shell interpolation)
  • Placeholder init_worker_by_lua_block for ngx_lua_cpp integration

web/index.html

  • Self-contained SPA, zero external dependencies
  • Left panel: Lua code editor with Ctrl+Enter execution, output history with success/error coloring
  • Right panel: Error/access log viewer with line count control, log-level color coding, 5s auto-refresh toggle
  • Header shows connection status, nginx version, ngx_lua_cpp state

Usage

# Adjust paths in nginx.conf, then:
openresty -p `pwd` -c nginx.conf
# Open http://localhost:8080

Debug Console


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

- web/nginx.conf: OpenResty config with API endpoints for Lua code
  execution, log retrieval, log clearing, and server info
- web/index.html: Single-page debug console UI with Lua terminal
  (code editor + output) and server log viewer with auto-refresh

Co-authored-by: paintdream <7030141+paintdream@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paintdream/ngx_lua_cpp/sessions/f44b2ed1-ba42-480f-9e4a-7035bf3c50ab
Copilot AI changed the title [WIP] Add debug administration website using OpenResty Add debug/administration website for ngx_lua_cpp Mar 25, 2026
Copilot AI requested a review from paintdream March 25, 2026 06:23
@paintdream paintdream marked this pull request as ready for review March 26, 2026 05:50
@paintdream paintdream merged commit 813b09c into master Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants