Skip to content

daemon1024/paste.land

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

paste.land

deno version GitHub license paste.land Telegram Chat GitHub Actions status

Paste tool made in deno

Setup

  • Install Deno
  • Fork and Clone the repository
git clone https://github.com/<your-username>/paste.land
  • Move into the project folder
cd paste.land
  • Start the server
deno run --allow-net  mod.ts

The output should be

Listening on http:https://localhost:8000/

Usage

Head over to http:https://localhost:8000/ on your PC or use some API tool like curl, Insomnia or Postman. We will be using curl in the following examples.

  • GET / -> Returns Hello World
curl http:https://localhost:8000/
  • GET /:id -> Retrieve the paste with the given id as plain-text.
curl http:https://localhost:8000/<id>
  • POST / -> Send the data in plaintext along. Will respond with a link to the paste.
curl --data "My first paste" -H "Content-Type: text/plain" -X POST http:https://localhost:8000/

Contributing to the project

Refer CONTRIBUTING.md