Personal link shortening service built with fastify
- Fastify - HTTP Router
- BCrypt - Hashing and dehashing of password
- JWT - Encrypted payload that holds data
- Knex - Database query builder
- NanoID - URL-safe ID generator
- UUID - Unique ID generator
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
General message about the API
Create a short link.
Request Body
{
destination: string
}
Status 200
{
nanoId: string,
id: string
}
Delete a short link
Status 200
{
id: string,
shorthand_id: string
}
Create an account.
Request Body
{
email: string,
username: string,
password: string
}
Status 200
{
token: string
}
Login to an account and retrieve the generated token.
Request Body
{
username: string,
password: string
}
Status 200
{
token: string
}
Status 401
{
message: string
}
Access a short link, will redirect user to the destination
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>