<commit_before># now-go [![npm-version][npm-badge]][npm-link]

A tinyurl service.

<p align="center">
  <img src="https://amio.github.io/now-go/hero.jpg" /><br/>
  <i>Now go, let the legend come back to life!</i>
</p>

## Features

- Lightweight tinyurl service (in 100 lines).
- Three types of routes:
  - URL: redirect to an url
  - TEXT: echo a string
  - FUNCTION: return a URL/TEXT by `req` argument
- Deploy to now.sh with one command.

## Quick Start

- cli
  ```
  npm i -g now-go
  now-go -c path/to/config.json
  ```

- programaticly
  ```javascript
  import nowgo from 'now-go'

  const config = {/*...*/} // routes config
  go(config)
  ```

## The `example.config.json`

All configurations are optional:

```javascript
{
  // redirect to a url
  "/": "https://github.com/amio/now-go",
  // echo a string
  "/tag": "Now go, let the legend come back to life!",

  // special route for __unmatched path__
  "*": "Yet another tinyurl service by now-go. https://github.com/amio/now-go"
}
```

*This is the config for http://go.now.sh.*

## License

[MIT][mit] © [Amio][author]

[now]:      https://zeit.co/now
[npm-badge]:https://img.shields.io/npm/v/now-go.svg?style=flat-square
[npm-link]: http://www.npmjs.com/package/now-go
[mit]:      http://opensource.org/licenses/MIT
[author]:   http://github.com/amio
[config-eg]:https://github.com/amio/now-go/blob/master/example.config.js<commit_msg>Add example.config.js link<commit_after># now-go [![npm-version][npm-badge]][npm-link]

A tinyurl service.

<p align="center">
  <img src="https://amio.github.io/now-go/hero.jpg" /><br/>
  <i>Now go, let the legend come back to life!</i>
</p>

## Features

- Lightweight tinyurl service (in 100 lines).
- Three types of routes:
  - URL: redirect to an url
  - TEXT: echo a string
  - FUNCTION: return a URL/TEXT by `req` argument
- Deploy to now.sh with one command.

## Quick Start

- cli
  ```
  npm i -g now-go
  now-go -c path/to/config.json
  ```

- programmatically
  ```javascript
  import nowgo from 'now-go'

  const config = {/*...*/} // routes config
  go(config)  // Start server on port 3000
  ```

## The `example.config.json`

```javascript
{
  // redirect to a url
  "/": "https://github.com/amio/now-go",

  // echo a string
  "/tag": "Now go, let the legend come back to life!",

  // special route for __unmatched path__
  "*": "Yet another tinyurl service by now-go. https://github.com/amio/now-go"
}
```

or [`example.config.js`](example.config.js) *The config for http://go.now.sh.*

## License

[MIT][mit-link] © [Amio][author]

[now]:      https://zeit.co/now
[npm-badge]:https://img.shields.io/npm/v/now-go.svg?style=flat-square
[npm-link]: http://www.npmjs.com/package/now-go
[mit-link]: http://opensource.org/licenses/MIT
[author]:   http://github.com/amio
{'fraction_non_alphanumeric': 0.18563734290843806, 'fraction_numerical': 0.003590664272890485, 'mean_word_length': 3.0850439882697946, 'pattern_counts': {'":': 6, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 11, 'lorem ipsum': 0, 'www.': 2, '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': '1388333', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1019, 'n_words': 265}