Last active
August 5, 2018 17:42
-
-
Save henriquegogo/036999a04b94dff29a40 to your computer and use it in GitHub Desktop.
How to create a simple webservice with Orbit and Lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!./bin/orbit | |
local orbit = require 'orbit' | |
module('app', package.seeall, orbit.new) | |
local routes = { | |
index = function(web) | |
return 'Start page<br><a href=/about>About</a>' | |
end, | |
about = function(web) | |
return 'Its me! Mario!' | |
end | |
} | |
app:dispatch_get(routes.index,'/') | |
app:dispatch_get(routes.about,'/about') | |
return _M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to call google maps from lua