-
Notifications
You must be signed in to change notification settings - Fork 8
Getting Started
-
Get necessary build tools. libuv, one of the Luaw dependencies uses autotools, autoconf and libtoolize in its build system. If your machine is not already setup with these, you can use following steps to get these tools.
sudo apt-get install make sudo apt-get install autotools-dev sudo apt-get install autoconf sudo apt-get install build-essential libtool
-
Clone Luaw repository
git clone --recursive https://github.com/raksoras/luaw.git
-
Build Luaw to use standard PUC-Rio Lua VM
cd luaw make linux
or, build Luaw to use LuaJit VM
cd luaw make LUAVM=luajit linux
While building on mac OS use target "macosx". For example
cd luaw make LUAVM=luajit macosx
-
Install Luaw binary - luaw_server - in directory of your choice. We will use
~/luawsample
in all our examples going forward as a directory of choice for Luaw installationmake INSTALL_ROOT=~/luawsample install
To install binaries along with the sample app provided
make INSTALL_ROOT=~/luawsample install-sample
##Luaw directory structure
In the tree diagram below ~/luawsample
is a directory that you chose in the make intsall
step above. It will act as a root for Luaw server's directory structure. The make install
step will create following directory structure under ~/luawsample
~/luawsample
|
|
+--- bin Directory that holds Luaw server binary we built
| along with all necessary Lua libraries
|
+--- conf Directory for server configuration
| |
│ +--- server.cfg Sample server configuration file, to be used as a starting point
|
+--- lib Directory to install any third party or user supplied Lua
| libraries that application may depend on.
|
+--- logs Directory for server logs
|
+--- webapps Directory to install Luaw webapps
##License
Luaw uses MIT license for all parts of Luaw that are not externally maintained libraries like libuv.
Please post your questions/comments on Google Group Luaw and follow @raksoras on Twitter
- Introduction
- Getting started
- Luaw configuration
- Your first Luaw webapp
- Your second Luaw webapp
- Luaw template views
- Your third Luaw webapp
- Multi-part file upload requests
- Luaw logging framework
- Luaw response object
- Luaw async HTTP Client
- Luaw threads
- Luaw timers
- Writing custom HTTP handlers
- Running custom Luaw scripts at start up