Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtarchie/sinatra-openresty
Sinatra ported to OpenResty framework.
https://github.com/jtarchie/sinatra-openresty
Last synced: 7 days ago
JSON representation
Sinatra ported to OpenResty framework.
- Host: GitHub
- URL: https://github.com/jtarchie/sinatra-openresty
- Owner: jtarchie
- License: mit
- Archived: true
- Created: 2013-06-11T01:29:57.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-31T00:14:17.000Z (about 11 years ago)
- Last Synced: 2024-05-01T23:57:43.719Z (7 months ago)
- Language: Lua
- Size: 320 KB
- Stars: 43
- Watchers: 7
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-resty - sinatra-openresty
README
# Introduction
I'm a fan of the Ruby library [Sinatra](http://sinatrarb.com). It provides a great DSL to map HTTP requests to build APIs, websites, or just simple wrappers around already working code.
# Getting Started
```sh
git clone https://github.com/jtarchie/sinatra-openresty.git
cd sinatra-openresty
```Take a look at the example application under `examples/app.lua`.
# TODO
* look into using standard request and response objects ([WSAPI](https://github.com/keplerproject/wsapi) or [Rack](https://github.com/pintsized/lua-resty-rack))
* Provide example application that uses JSON and database
* Optimize route callback (should I be using coroutines or pcall)
* Write documentation for supported functionality# Test
Assuming that you already have OpenResty installed, `nginx` is available via
PATH, and you've added [moonrocks](http://rocks.moonscript.org/about).```sh
luarocks install sinatra-dev-1.rockspec
busted
```