<commit_before># little

A URL shortener using Redis and Node.js

## Requirements

redis-node-client (included; authored by <NAME>, Fictorial)

Node.js [http://nodejs.org](http://nodejs.org)

Redis [http://github.com/antirez/redis](http://github.com/antirez/redis)

## Usage

Start the server:

    $ node little.js
    Server running at http://localhost:8080

Shorten a URL by sending a request to http://localhost:8080?url=http://example.com

The server will respond with a short URL.

Set the port and host in little.js.

## In action

Go to [ltlr.us/?url=http://example.com](http://ltlr.us/?url=http://example.com)<commit_msg>Add instructions on using command-line arguments<commit_after># little

A URL shortener using Redis and Node.js

## Requirements

redis-node-client (included; authored by <NAME>, Fictorial)

Node.js [http://nodejs.org](http://nodejs.org)

Redis [http://github.com/antirez/redis](http://github.com/antirez/redis)

## Usage

Start the server:

    $ node little.js
    Server running at http://localhost:8080

Shorten a URL by sending a request to http://localhost:8080?url=http://example.com

The server will respond with a short URL.

By default, the server runs on port 8080 and uses Redis database No. 5. Different values can be given in command-line arguments:

    $node little.js -p 8888 -db 2

## In action

Go to [ltlr.us/?url=http://example.com](http://ltlr.us/?url=http://example.com)
{'fraction_non_alphanumeric': 0.13352073085031624, 'fraction_numerical': 0.018271257905832748, 'mean_word_length': 3.9273356401384083, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1806953', 'n_tokens_mistral': 499, 'n_tokens_neox': 458, 'n_words': 143}