<commit_before>IsUp provides a simple API that allows you to check if a service is running or not.

Compile
-------
Check out the sources and run

    go get -d ./src/main/ && go build -o ./bin/IsUp ./src/main
    
Run
---

    ./bin/IsUp
    
By default IsUp will listen on port 8888. If you want to change it, pass the "--port" option to the program.

    ./bin/IsUp --port=3333
    
Use
---

You can check the status of any host and port by accessing the URL:
    
    http://localhost:8888/{host}/{port}
    
For example, to check the GitHub site go to:

    http://localhost:8888/github.com/80
    
If a TCP connection can be established, the service will return:

    {
        "success": true
    }
    
Otherwise the response will be:

    {
        "success": false
    }<commit_msg>Update README with new the timeout parameter<commit_after>IsUp provides a simple API that allows you to check if a service is running or not.

Compile
-------
Check out the sources and run

    go get -d ./src/main/ && go build -o ./bin/IsUp ./src/main
    
Run
---

    ./bin/IsUp
    
By default IsUp will listen on port 8888. If you want to change it, pass the "--port" option to the program.

    ./bin/IsUp --port=3333
    
IsUp will wait up to 10 second before declaring the host down. 
If you want to change this duration, pass the "--default-timeout" option:

    ./bin/IsUp --default-timeout=30
    
Use
---

You can check the status of any host and port by accessing the URL:
    
    http://localhost:8888/{host}/{port}
    
For example, to check the GitHub site go to:

    http://localhost:8888/github.com/80
    
If a TCP connection can be established, the service will return:

    {
        "success": true
    }
    
Otherwise the response will be:

    {
        "success": false
    }
    
If you want to use a timeout value other than the default, pass a "timeout"
parameter to the request:

    http://localhost:8888/github.com/80?timeout=5
    
{'fraction_non_alphanumeric': 0.09601634320735444, 'fraction_numerical': 0.02400408580183861, 'mean_word_length': 2.2704507512520866, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '6732442', 'n_tokens_mistral': 625, 'n_tokens_neox': 572, 'n_words': 259}