Skip to content

matthew-tanner/link-bytes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkBytes

LinkBytes is a link shortener API. You can use it directly with Postman or from a frontend app.

Packages Used

  • restify
  • restify-cors-middleware
  • restify-errors
  • restify-plugins
  • dotenv
  • mongoose
  • nanoid

Installation

you will need to make a .env based on the ".env-template" file.

API_NAME    = <give it a name>
PORT        = <port to listen on>
VERSION     = <set your version>
DB_URL      = <mongodb URI>
npm install
npm run start

Usage

The core api currently routes 2 endpoints:

/bytes/<your-long-url>

This endpoint is for generating the short url code. It returns only the code needed.

/<short-url-code>

This endpoint is for redirecting to the original URL based on the give code.


An Example:

https://localhost:3001/bytes/www.somereallylongurlthatneedstobesupershort.com


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published