<commit_before>#Simple-Syrvup Documentation

This small framework allows for server creation with easier settings for GET and POST endpoints.

##Installation

To install this package:

```
npm init
npm install simple-syrvup
```

To use Simple-Syrvup:
```
var syrvup = require('simple-syrvup');
```

##Starting Server

To start the server, first set the port:
```
syrvup.port = <enter port value>
```
```
syrvup.server.listen(syrvup.port, () => {
  process.stdout.write('Server is running at localhost:' + syrvup.port + '\n');
});
```

##Setting Up Routes

Simple-Syrvup allows the creation of multiple requests to endpoints through the creation of arrays.

###GET Routes

Simple-Syrvup allows the user to set an array of objects to set the GET endpoints.
The GET endpoints allow server to return text, an HTML file, or a callback function.

To set GET endpoints, in your server.js file, the command is:
```
syrvup.getEndpoints(getArray);
```

The array of objects are in the form:
```
var getArray =
[
  { url: '/', content: <sample text> },
  { url: '/test', content: <path to HTML file> },
  { url: '/another', content: <Callback function> }
]
```

Example of text:
```
'this is sample text'
```

Example of path to HTML (this file is your creation)
```
__dirname + '/index.html'
```

Example of a callback function:
```
function(req, res) {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.write('yay');
  res.end();
};
```

###POST Routes

Simple-Syrvup also allows the user to set an array of objects for their POST endpoints.
The POST endpoints allow the user to save the POST in JSON format at a specified location.

If no file exists at the saveLocation, a file titled "postData.json" will be created. The directory must be already created.

First

To set POST endpoints, the command is:
```
syrvup.postEndpoints(postArray);
```

The endpoint object is in the following format:
```
var postArray =
[
  { url: '/', saveLocation: <file location> },
  { url: '/another-location', saveLocation: </../data/example.json> }
]
```

The sample JSON file would contain this to begin:
```
{"count":"0"}
```<commit_msg>update to readme in posts<commit_after>#Simple-Syrvup Documentation

This small framework allows for server creation with easier settings for GET and POST endpoints.

##Installation

To install this package:

```
npm init
npm install simple-syrvup
```

To use Simple-Syrvup:
```
var syrvup = require('simple-syrvup');
```

##Starting Server

To start the server, first set the port:
```
syrvup.port = <enter port value>
```
```
syrvup.server.listen(syrvup.port, () => {
  process.stdout.write('Server is running at localhost:' + syrvup.port + '\n');
});
```

##Setting Up Routes

Simple-Syrvup allows the creation of multiple requests to endpoints through the creation of arrays.

###GET Routes

Simple-Syrvup allows the user to set an array of objects to set the GET endpoints.
The GET endpoints allow server to return text, an HTML file, or a callback function.

To set GET endpoints, in your server.js file, the command is:
```
syrvup.getEndpoints(getArray);
```

The array of objects are in the form:
```
var getArray =
[
  { url: '/', content: <sample text> },
  { url: '/test', content: <path to HTML file> },
  { url: '/another', content: <Callback function> }
]
```

Example of text:
```
'this is sample text'
```

Example of path to HTML (this file is your creation)
```
__dirname + '/index.html'
```

Example of a callback function:
```
function(req, res) {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.write('yay');
  res.end();
};
```

###POST Routes

Simple-Syrvup also allows the user to set an array of objects for their POST endpoints.
The POST endpoints allow the user to save the POST in JSON format at a specified location.

If no file exists at the saveLocation, a file titled "postData.json" will be created. The directory must be already created by the user.

To set POST endpoints, the command is:
```
syrvup.postEndpoints(postArray);
```

The endpoint object is in the following format:
```
var postArray =
[
  { url: '/', saveLocation: <directory> },
  { url: '/another-location', saveLocation: </../data/> }
]
```

The sample JSON file would contain this to begin:
```
{"count":"0"}
```
{'fraction_non_alphanumeric': 0.13178294573643412, 'fraction_numerical': 0.0018792576932111817, 'mean_word_length': 4.2309582309582305, 'pattern_counts': {'":': 2, '<': 15, '<?xml version=': 0, '>': 17, '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': '5637864', 'n_tokens_mistral': 1391, 'n_tokens_neox': 1310, 'n_words': 533}