Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 1.02 KB

File metadata and controls

34 lines (21 loc) · 1.02 KB

RESTful Services in Lua

This directory contains the example source code for the tutorial Designing RESTful Services in Lua, which shows how to implement a RESTful API using the Barracuda Application Server library.


🛠️ Running the example code

Run the example, using the Mako Server, as follows:

cd LSP-Examples/REST
mako -l::www

Testing the Service

A Python script is included to test the RESTful API implementation. Before running the script, ensure that the server is listening on port 80 (on Linux run: sudo mako -u `whoami` -l::www).

To run the test:

python TestApi.py

📂 File Overview

File Path Description
www/.lua/rest.lua The RESTful service Lua module
www/.preload The RESTful example code