🔗🚀 Personal link shortening service built with fastify.
MIT License
Personal link shortening service built with fastify
API Routes suffixed with require authentication. You authenticate yourself by passing an Authorization: Bearer <token>
header with your request. You can retrieve a token by creating an account or logging into an account
GET /api/v1/
General message about the API
POST /api/v1/redirects
Create a short link.
Request Body
{
destination: string
}
Status 200
{
nanoId: string,
id: string
}
DELETE /api/v1/redirects/s/:id
Delete a short link
Status 200
{
id: string,
shorthand_id: string
}
POST /api/v1/accounts/
Create an account.
Request Body
{
email: string,
username: string,
password: string
}
Status 200
{
token: string
}
POST /api/v1/accounts/login
Login to an account and retrieve the generated token.
Request Body
{
username: string,
password: string
}
Status 200
{
token: string
}
Status 401
{
message: string
}
GET /s/:id
Access a short link, will redirect user to the destination
GET /
Home page
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please ensure any and all commits pass our tests, linting, and build steps
Licensed under the MIT License
For routes that require authentication, please pass a header like so: Authorization: Bearer <TOKEN>