Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avigoldman/err-link
Build err.sh links
https://github.com/avigoldman/err-link
err-sh errors zeit
Last synced: about 8 hours ago
JSON representation
Build err.sh links
- Host: GitHub
- URL: https://github.com/avigoldman/err-link
- Owner: avigoldman
- License: mit
- Created: 2017-12-25T00:50:21.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-25T02:55:18.000Z (almost 7 years ago)
- Last Synced: 2024-11-12T18:12:27.247Z (6 days ago)
- Topics: err-sh, errors, zeit
- Language: JavaScript
- Homepage: https://npmjs.com/err-link
- Size: 37.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# err-link [![Build Status](https://travis-ci.org/avigoldman/err-link.svg?branch=master)](https://travis-ci.org/avigoldman/err-link)
> Build err.sh links
Generate short links to error messages stored in the `/errors` folder of your repositories. Read the [blogpost](https://zeit.co/blog/err-sh) for more.
## Install
```
$ npm install err-link
```## Usage
```js
const err = require('err-link')err('zeit', 'now-cli', 'env-no-secret')
//=> 'https://err.sh/zeit/now-cli/env-no-secret'const instance = err.instance('zeit', 'now-cli')
instance('env-no-secret')
//=> 'https://err.sh/zeit/now-cli/env-no-secret'
```## API
### err(user, repo, code)
#### user
Type: `string`
The GitHub user or organization
#### repo
Type: `string`
The GitHub repository name
#### code
Type: `string`
The filename for the error message
### err.instance(user[, repo])
Creates an instance of the `err` function with the given preset values
#### user
Type: `string`
The GitHub user or organization
```js
const err = require('err-link').instance('zeit')err('now-cli', 'env-no-secret')
//=> 'https://err.sh/zeit/now-cli/env-no-secret'
```#### repo
Type: `string`
The GitHub repository name
```js
const err = require('err-link').instance('zeit', 'now-cli')err('env-no-secret')
//=> 'https://err.sh/zeit/now-cli/env-no-secret'
```## Examples
* [https://err.sh/zeit/now-cli/env-no-secret](https://err.sh/zeit/now-cli/env-no-secret)
* [https://err.sh/zeit/micro/path-missing](https://err.sh/zeit/micro/path-missing)## Related
- [err-sh](https://github.com/zeit/err-sh) - Microservice that forwards you to error messages
## License
MIT © [Avi Goldman](https://avigoldman.com)