Anyone interested in some server space for web lua?

@Briarfox So this is like server to client stuff right? But instead of AJAX or some other API you are using lua?

@Prynok - This is Lua acting like PHP, not JavaScript. I don’t quite get your question.

@Zoyt Sorry, let me rewrite it, I was basically asking if Lua is held on a server, and taking in and responding to clients.

Yes it’s on the server and yes it can handle requests. However I’m having issues getting it to work with the db. mod_lua would be great for using a db with codea project but there is almost no information on it.

I did say javascript near the top and that was a mistake :stuck_out_tongue:

Article on mod_lua

@Briarfox that article is quite outdated (we have been pushing a LOT of new stuff into mod_lua lately), you should check the official documentation or modlua.org for an actual up-to-date look at the module. This is not simply Lua acting like PHP, this is far more powerful (and explosive) than a simple php interpreter. It allows you to modify the inner workings of Apache, work with web sockets and a whole lot more. If you intend to share it with others, be sure it’s people you trust, as you can really do a lot of stuff (some of which may be unintended by you) with mod_lua. If you are ever on IRC, you’re welcome to join #httpd on the Freenode network and have a chat about what mod_lua can and can’t and how to get it working (including how to set up and use databases).

@Humbedooh - Interesting. I’ll look at it. (Do you keep tabs on Google updates on this? If so, you pretty much summed it up on your Twitter summary. :slight_smile: )

@humbedooh Thanks for the info. I’ll get on IRC, just wish there was more info out there on mod_lua. I’ve been beating my head against a wall for the last two days trying to get the DB connection working. (It’s apache not mod_lua)

@Briarfox Yes, if you’re not an APR/httpd savvy person, then getting the database set up right can be a bit tricky the first time. Making it work from inside mod_lua is easy, but you’ll need the database driver(s) installed first. If you use debian or ubuntu, these driver packages are usually called libaprutil1-dbd-mysql, libaprutil1-dbd-pgsql and so on. Once those are installed or built on your server, it’s relatively easy to connect to a database either through a manual connection to it or through the mod_dbd module, which is recommended for production use. I can help walk you through the process if you’re ever on IRC (when I’m awake that is, I suspect we’re not on the same continent :wink: ).

Thanks @Humbedoh! Databases are now up and running. Send me a pm if you’d like to play with it.