https://github.com/leafo/lapis-console
Interactive console for working with Lapis
https://github.com/leafo/lapis-console
Last synced: 28 days ago
JSON representation
Interactive console for working with Lapis
- Host: GitHub
- URL: https://github.com/leafo/lapis-console
- Owner: leafo
- Created: 2013-03-18T16:03:34.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2021-01-25T16:55:07.000Z (over 4 years ago)
- Last Synced: 2025-04-01T03:13:25.277Z (2 months ago)
- Language: Lua
- Size: 223 KB
- Stars: 43
- Watchers: 5
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lapis Console
An interactive console for the [Lapis][1] web framework.
```moonscript
-- app.moon
lapis = require "lapis"
console = require "lapis.console"class extends lapis.Application
"/console": console.make!
``````bash
$ lapis server development
```Hit

## Tips
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`.## Building
Uses [Tup][2], the build system.
```bash
$ 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:```bash
$ find . -name "*.lua" -exec rm {} \;
```# Contact
Author: Leaf Corcoran (leafo) ([@moonscript](http://twitter.com/moonscript))
Email: [email protected]
Homepage:
License: MIT# License
Lapis Console includes the following libraries:
```
jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
``````
CodeMirror 3.1 Copyright (C) 2013 by Marijn Haverbeke
```[1]: https://github.com/leafo/lapis
[2]: http://gittup.org/tup/