0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Add a more involved REST example

A pastebin type application that can optionally highlight the output as
both text and HTML.
This commit is contained in:
Adam Cammack 2013-02-06 13:09:49 -06:00
parent ae401f7460
commit d7b83db92e
11 changed files with 303 additions and 0 deletions

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>Simple Pastebin</title>
</head>
<body>
<h1>Simple Pastebin</h1>
<p>
You can paste your text into the text field to submit, or you can
capture the output of a command with:
</p>
<code>
<i>command</i> | curl -i --data-urlencode paste@- localhost:8080
</code>
<form action="/" method="post">
<textarea cols="80" rows="15" name="paste"></textarea>
<div>
<button type="submit">Upload your code</button>
</div>
</form>
</body>
</html>

View file

@ -0,0 +1,7 @@
Simple Pastebin
---------------
You can paste your text into the text field to submit, or you can capture the
output of a command with:
<command> | curl -i --data-urlencode paste@- localhost:8080