https://github.com/fiware/lua-fiware-lib
Common FIWARE helper libraries in lua
https://github.com/fiware/lua-fiware-lib
Last synced: 6 months ago
JSON representation
Common FIWARE helper libraries in lua
- Host: GitHub
- URL: https://github.com/fiware/lua-fiware-lib
- Owner: FIWARE
- License: mit
- Created: 2022-04-06T12:55:02.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-28T14:54:21.000Z (over 2 years ago)
- Last Synced: 2025-03-11T21:46:37.491Z (10 months ago)
- Language: Lua
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lua-fiware-lib
[](https://www.fiware.org/developers/catalogue/)
[](https://opensource.org/licenses/MIT)
[](http://stackoverflow.com/questions/tagged/fiware)


This library provides several lua modules offering
common functionalities required in FIWARE architectures
Requirements:
* `lua >= 5.1`
* `openresty >= 1.19.9`
This project is part of [FIWARE](https://www.fiware.org/). For more information check the FIWARE Catalogue entry for the
[API Management](https://github.com/Fiware/catalogue/tree/master/security).
## Installation
The Lua package manager [LuaRocks](https://luarocks.org/) is required.
For installation of the library and all necessary dependencies run:
```shell
luarocks make
```
## Testing
The [busted](http://olivinelabs.com/busted/) framework is used.
OpenResty provides a Docker image which can be used to run the tests
without setting up a full environment.
To run the tests:
```shell
docker run --rm -it -v $PWD:/fiware openresty/openresty:1.19.9.1-10-alpine-fat \
/bin/bash -c 'cd /fiware && ./run_tests.sh'
```
### Development
To test during development, run the container and install the busted framework:
```shell
docker run --rm -it -v $PWD:/fiware openresty/openresty:1.19.9.1-10-alpine-fat /bin/bash
> cd /fiware
> luarocks install busted
```
After code changes, compile the lib and run your tests:
```shell
> cd /fiware
> luarocks make
# E.g., run ngsi_helper.lua tests
> resty spec/ngsi_helper_spec.lua
```