Interactive console for working with Lapis
Lua JavaScript CSS Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lapis/console rebuild Sep 9, 2014
.gitignore ignore lint_config.lua Mar 1, 2014
Makefile rename module to lapis-console Apr 1, 2014
Tuprules.tup pack assets to lua files Mar 21, 2013
lint_config.moon clean ups Jan 20, 2014

Lapis Console

An interactive console for the Lapis web framework.

-- app.moon
lapis = require "lapis"
console = require "lapis.console"

class extends lapis.Application
  "/console": console.make!
$ lapis server development

Hit http://localhost:8080/console



Each command executes on the server. The print function has been overwritten to print to the browser. It has also been enhanced, you can print tables and get an interactive version that you can open and close in the browser. Just click on the bold { ... } to open the table up.

Any SQL queries that take place when running the code you submit will also be captured and printed as part of the result.

The input field is a full multi-line text editor. You can write an entire program in it.

The code that runs is not restricted in any way. If you run while true it will run forever. If someone malicious gets access to it then they can do damage to you system.

The console is only accessible in the "development" environment. It will return a 404 if accessed in any other environment. You can bypass this protection by passing {env = "all"} as the first argument of make_console.


Uses Tup, the build system.

$ tup init
$ tup upd

On UNIX or Linux systems, you might need to remove the .lua source files first to get tup to build properly:

$ find . -name "*.lua" -exec rm {} \;


Author: Leaf Corcoran (leafo) (@moonscript)
License: MIT


Lapis Console includes the following libraries:

jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. |
CodeMirror 3.1 Copyright (C) 2013 by Marijn Haverbeke <>