Skip to content

a simple APIServer demo based on OpenResty and lor. (Shredder was one of my favorite heroes in dota)

License

Notifications You must be signed in to change notification settings

tweyseo/Shredder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APIServer

Overview

It's a demo of APIServer based on OpenResty and lor.

This demo dedicated to demonstrating usages of common components in APIServer which based on OpenResty.

The APIServer follow the specifications of process below:

  1. middleware handle every request first,
  2. next the handler you specify in router (actually in every index.lua of specific handler) process the corresponding request,
  3. then the module and the dao will handle the actual logic and data,
  4. then back to the handler which will do response,
  5. do log at logStage.lua.

note that, server.lua and init.lua were invoked only when the first request arrived.

Useage

You are recommended to use start.sh, reload.sh and stop.sh to start, reload and stop your APIServer, of course, you should specify your path of OpenResty in the scripts above and restys (lor, http, rediscluster, LFS, lua-resty-json)that was depended.

TODO

  1. the spec and example of the dao layer under the model layer.

License

MIT

About

a simple APIServer demo based on OpenResty and lor. (Shredder was one of my favorite heroes in dota)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published