Eplaypen
Erlang web playground http://tryerl.seriyps.ru/
Install / Use
/learn @seriyps/EplaypenREADME
A web interface to run or compile Erlang code
Built with Docker, PostgreSQL and Cowboy.
It is hosted at http://tryerl.seriyps.ru/.
HTTP API
It supports x-www-form-urlencoded as well as json payload.
There are 3 endpoints:
- evaluate
- compile
- pastebin
Evaluate
Evaluates Erlang code and prints it's stdout and process return code.
JSON
curl -i -d '{"code":"-module(main). -export([main/0]). main() -> io:format(\"Hello, world!\").","release":"21.3"}' -H "Content-Type: application/json" http://tryerl.seriyps.ru/api/evaluate
x-www-form-urlencoded
curl -i -d 'code=-module(main).%20-export(%5Bmain%2F0%5D).%20main()%20-%3E%20io%3Aformat(%22Hello%2C%20world!%22).&release=21.3' http://tryerl.seriyps.ru/api/evaluate
Compile
Compiles Erlang code to different forms and prints compilation result.
JSON
curl -i -d '{"code":"-module(main). -export([main/0]). main() -> io:format(\"Hello, world!\").","release":"21.3","emit":"beam"}' -H "Content-Type: application/json" http://tryerl.seriyps.ru/api/compile
x-www-form-urlencoded
curl -i -d 'code=-module(main).%20-export(%5Bmain%2F0%5D).%20main()%20-%3E%20io%3Aformat(%22Hello%2C%20world!%22).&release=21.3&emit=beam' http://tryerl.seriyps.ru/api/compile
Pastebin
Basic pastebin to store and retrieve code snippets.
JSON
curl -i -d '{"code":"-module(main). -export([main/0]). main() -> io:format(\"Hello, world!\").","release":"21.3","emit":"beam"}' -H "Content-Type: application/json" http://tryerl.seriyps.ru/api/pastebin
x-www-form-urlencoded
curl -i -d 'code=-module(main).%20-export(%5Bmain%2F0%5D).%20main()%20-%3E%20io%3Aformat(%22Hello%2C%20world!%22).&release=21.3&emit=beam' http://tryerl.seriyps.ru/api/pastebin
New pastebin ID / URL will be returned in Location HTTP header.
Paste contents can be queried by this URL. HTTP Accept header is respected. Supported
values are application/x-www-form-urlencoded (default) and application/json.
curl -i -H "Accept: application/json" http://tryerl.seriyps.ru/api/pastebin/<paste id>
Deployment
Create new Ansible variables file
cp deploy/vars_example.yml deploy/vars.yml
nano deploy/vars.yml
Create Ansible inventory file
It should have playpen host.
nano deploy/hosts
Run ansible
ansible-playbook -D -K -i deploy/hosts deploy/main.yml
Be careful to not run it with postgres tag agin - it may wipe your pastebin database!
Use --skip-tags postgres for re-deployment / upgrades.
--tags=src,conf,erl_version,release,start for OTP version updates.
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
