A simple URL shortener with Deno KV.
Mijikee works on Deno Deploy.
Install Deno CLI v1.33.1 or higher.
From within your project folder, start the development server using the
deno task
command.
deno task start
Now open http://localhost:8000 in your browser to view the page.
To deploy the project on Deno Deploy.
- Push your project to GitHub.
- Create a Deno Deploy project.
- Link the Deno Deploy
project to the
main.ts
file in the root of the created repository. - The project will be deployed to a public $project.deno.dev subdomain.
Save URL in KV by sending POST request to /api/v1/links
.
And you can access the URL from :/shortPath
.
Hello Mijikee!
Redirect to URL set in shortPath
.
Save URL in KV.
Name | Type | Description |
---|---|---|
url | string | need url starting with "https://" |
{
message: "Short URL is created.",
status: "ok",
originUrl: "example.com",
shortPath: "ExaMpLE"
}