Open-sourced URL shortener. Built with JavaScript, powered by Node.js.
Currently, there is no live instance of OpenLink. If you would like to add your own version of OpenLink for everyone to see, email me at [email protected] and I would be happy to give your project a shout-out!
This endpoint requires 2 queries: link
and slug
. Link represents the link to redirect to and slug represents the short link URL (e.g. mywebsite.com/slug_here
).
Example: mywebsite.com/api/create?link=https://github.com/milanmdev/openlink&slug=openlink
This endpoint requires 2 queries: ip
and staffkey
. IP represents the IP to ban and staffkey represents the staffkey. Staffkey is defined in the config.json
.
Example: mywebsite.com/api/ban?ip=127.0.0.1&staffkey=abcdefghijklmnopqrstuvwxyz123456789
This endpoint requires 1 parameter: id
. ID represends the slug of the link to search. Slugs can be created with the /api/create
endpoint.
Example: mywebsite.com/api/openlink
Hosting OpenLink is quick and easy! Follow the directions below to run an instance of OpenLink.
- Clone the repository by either clicking
Download
or rungit clone https://github.com/milanmdev/openlink.git
in your console. - Open the folder and run
npm i
. This will install the dependencies needed. - In any text/code editor, open the
config.example.json
and change the values to what's needed. Staffkey can be any random string of text and/or numbers. When done, rename the file toconfig.json
- Run
npm start
in your console. - Visit your running app at
localhost:80
.
Report bugs using the built in "Issues" feature. Simple click on the "Issues" tab (on GitHub) and click "New Issue". Then type out your issue and click "Open Issue".