nthnd / bb-pastebin

babashka pastebin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bb-pastebin

A silly little pastebin clone written in Babashka.

Usage

Requirements

Dev

bb init-db         # initialize database
bb serve           # start the server
bb get ID          # get paste with id of ID
bb create CONTENT  # paste the specified CONTENT

Configuration

Edit the config.edn at the root of the repository.

{:port 8080
 :db-file "./bb-pastebin.db"}

User

# creating a paste
curl -X POST -d "this is a paste" http://localhost:8080 # => 200 OK "paste id: 3"

# accessing a paste (3 is the id from above)
curl http://locahost:8080/3 # =>  200 OK "this is a paste"

About

babashka pastebin

License:MIT License


Languages

Language:Clojure 100.0%