Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/spences10/sveltekit-short-urls

Short URLs with SvelteKit
https://github.com/spences10/sveltekit-short-urls

short-url short-urls svelte sveltekit vercel

Last synced: 11 days ago
JSON representation

Short URLs with SvelteKit

Awesome Lists containing this project

README

        

# SvelteKit short URLs

A simple SvelteKit endpoint to redirect URL pathname to specified
destination.

Uses Upstash Redis for storing links and details

## Usage

**Adding a Hash**: In the Web CLI, you'd type the following and press
Enter:

```bash
HSET short_url: destination "" description "" visible "true | false"
```

**Updating a Field in Hash**: To update a specific field,
type:

```bash
HSET short_url: "" ""
```

**Deleting a Hash**: To delete a hash, enter:

```bash
DEL short_url:
```

**Viewing All Keys**: To see all keys, you'd type:

```bash
KEYS *
```

**Viewing a Hash**: To get all fields and values of a specific hash,
type:

```bash
HGETALL short_url:
```