<commit_before># TodoREST

Provides working examples of a basic REST API in a variety of different frameworks & languages.

Also provides a shared [Mocha](http://mochajs.org/) test script to verify that any of the example REST APIs is working correctly.

Inspired by <NAME>'s [TodoMVC](https://github.com/tastejs/todomvc) project.

## Setup

Confirmed to work on Windows and Linux; should presumably work on Mac OS X as well.

1. Download and install [Node.js](http://nodejs.org/download/) if you have not already done so
1. Download the source code using either of the options below

**Download via git**

1. Download and install [git](http://git-scm.com/downloads) if you have not already done so
1. Open a console window in the directory where you want to place the *todo-rest* project directory
1. Execute the following command line: `git clone https://github.com/troygizzi/todo-rest.git`

**Download manually**

1. Use the **Download ZIP** button to the right
1. Extract the ZIP file contents into the directory of your choice

## Executing the test for one of the example APIs

NOTE: If this is the first time running the test on a particular workstation, follow the **One-time initial setup** steps below first.

1. Edit the *test-name.txt* file to contain a single test/API name (e.g., `node-plain`), which corresponds to an *examples* subdirectory (and also a `testMetadata` object property in *test-metadata.js*)
1. Open a console window in the *test* subdirectory
1. Execute the following command line: `mocha spec.js -b -s 200 -t 5000`

**One-time initial setup**
1. Open a console window in the *test* subdirectory<commit_msg>main readme - added blank line to trigger correct list rendering<commit_after># TodoREST

Provides working examples of a basic REST API in a variety of different frameworks & languages.

Also provides a shared [Mocha](http://mochajs.org/) test script to verify that any of the example REST APIs is working correctly.

Inspired by <NAME>'s [TodoMVC](https://github.com/tastejs/todomvc) project.

## Setup

Confirmed to work on Windows and Linux; should presumably work on Mac OS X as well.

1. Download and install [Node.js](http://nodejs.org/download/) if you have not already done so
1. Download the source code using either of the options below

**Download via git**

1. Download and install [git](http://git-scm.com/downloads) if you have not already done so
1. Open a console window in the directory where you want to place the *todo-rest* project directory
1. Execute the following command line: `git clone https://github.com/troygizzi/todo-rest.git`

**Download manually**

1. Use the **Download ZIP** button to the right
1. Extract the ZIP file contents into the directory of your choice

## Executing the test for one of the example APIs

NOTE: If this is the first time running the test on a particular workstation, follow the **One-time initial setup** steps below first.

1. Edit the *test-name.txt* file to contain a single test/API name (e.g., `node-plain`), which corresponds to an *examples* subdirectory (and also a `testMetadata` object property in *test-metadata.js*)
1. Open a console window in the *test* subdirectory
1. Execute the following command line: `mocha spec.js -b -s 200 -t 5000`

**One-time initial setup**

1. Open a console window in the *test* subdirectory
{'fraction_non_alphanumeric': 0.08558558558558559, 'fraction_numerical': 0.010810810810810811, 'mean_word_length': 4.245669291338583, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6732944', 'n_tokens_mistral': 971, 'n_tokens_neox': 930, 'n_words': 482}