A silly little pastebin clone written in Babashka.
- Babashka: Installation
- Sqlite: Download
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
Edit the config.edn
at the root of the repository.
{:port 8080
:db-file "./bb-pastebin.db"}
# 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"