https://github.com/cvan/honeyishrunktheurl-html
world's tiniest (client-side) URL shortener
https://github.com/cvan/honeyishrunktheurl-html
Last synced: about 1 year ago
JSON representation
world's tiniest (client-side) URL shortener
- Host: GitHub
- URL: https://github.com/cvan/honeyishrunktheurl-html
- Owner: cvan
- Created: 2014-09-14T10:31:34.000Z (almost 12 years ago)
- Default Branch: gh-pages
- Last Pushed: 2014-09-14T10:38:51.000Z (almost 12 years ago)
- Last Synced: 2025-03-24T09:50:18.003Z (about 1 year ago)
- Language: JavaScript
- Homepage: http://cvan.io/honeyishrunktheurl-html/
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# honeyishrunktheurl-html
A completely client-side URL shortener. Written in HTML and client-side JavaScript.
## Requirements
You need a server.
Use Nginx/Apache in production, but for local development any basic server will do. (Stay away from Python's `SimpleHTTPServer` because of [this bug/feature](http://bugs.python.org/issue17324). Use [`http-server`](https://www.npmjs.org/package/http-server) instead:
npm install http-server -g && http-server
## Usage
1. Copy over a `sites.js`:
cp sites.js{.dist,}
This is where your routes live.
2. Have your server route all root-level traffic (`/.*`) to `/index.html`.
3. Load [http://localhost:8080/cvan](http://localhost:8080/cvan). (Or if you haven't rewritten the URLs, simply load [http://localhost:8080/?cvan](http://localhost:8080/?cvan).)