Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daemon1024/paste.land
Paste tool made in deno
https://github.com/daemon1024/paste.land
curl deno heroku pastebin restful-api typescript
Last synced: 21 days ago
JSON representation
Paste tool made in deno
- Host: GitHub
- URL: https://github.com/daemon1024/paste.land
- Owner: daemon1024
- License: mit
- Created: 2020-08-06T10:18:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-31T12:34:48.000Z (almost 4 years ago)
- Last Synced: 2024-08-03T15:11:04.955Z (3 months ago)
- Topics: curl, deno, heroku, pastebin, restful-api, typescript
- Language: TypeScript
- Homepage: https://paste-land.herokuapp.com/
- Size: 22.5 KB
- Stars: 6
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - daemon1024/paste.land - Paste tool made in deno (deno)
README
# paste.land
[![deno version](https://img.shields.io/badge/deno-^1.5.2-lightgrey?logo=deno)](https://github.com/denoland/deno)
[![GitHub license](https://img.shields.io/github/license/daemon1024/paste.land)](/LICENSE)
[![paste.land Telegram Chat](https://img.shields.io/badge/chat-paste.land-blue?logo=telegram)](https://t.me/paste_land)
[![GitHub Actions status](https://github.com/daemon1024/paste.land/workflows/deno/badge.svg?branch=master)](https://github.com//daemon1024/paste.land/actions)Paste tool made in deno
## Setup
- Install [`Deno`](https://deno.land/#installation)
- Fork and Clone the repository```sh
git clone https://github.com//paste.land
```- Move into the project folder
```sh
cd paste.land
```- Start the server
```sh
deno run --allow-net mod.ts
```The output should be
```sh
Listening on http://localhost:8000/
```## Usage
Head over to `http://localhost:8000/` on your PC or use some API tool like curl, [Insomnia](https://insomnia.rest/) or [Postman](https://www.postman.com/). We will be using curl in the following examples.
- `GET /` -> Returns Hello World
```sh
curl http://localhost:8000/
```- `GET /:id` -> Retrieve the paste with the given id as plain-text.
```sh
curl http://localhost:8000/
```- `POST /` -> Send the data in plaintext along. Will respond with a link to the paste.
```sh
curl --data "My first paste" -H "Content-Type: text/plain" -X POST http://localhost:8000/
```## Contributing to the project
Refer [CONTRIBUTING.md](/CONTRIBUTING.md)