# antaeus

> IPFS gateway

Latest version **0.8.0** (published 2017-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install antaeus
pnpm add antaeus
yarn add antaeus
bun add antaeus
```

Provides the commands `antaeus`, `antaeusctl`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.0 |
| Published | 2017-03-30 |
| First published | 2016-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Known vulnerabilities | 0 (+12 in 5 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | John Kane |
| Maintainers | kanej |
| Keywords | IPFS |

## Links

- npm: https://www.npmjs.com/package/antaeus
- Repository: github.com/kanej/antaeus
- npm.io page: https://npm.io/package/antaeus

## Dependencies (16)

- [nconf](https://npm.io/package/nconf.md) 0.8.4
- [osenv](https://npm.io/package/osenv.md) 0.1.4
- [ronin](https://npm.io/package/ronin.md) ^0.3.11
- [yargs](https://npm.io/package/yargs.md) 5.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [morgan](https://npm.io/package/morgan.md) 1.8.1
- [express](https://npm.io/package/express.md) ^4.15.2
- [is-ipfs](https://npm.io/package/is-ipfs.md) 0.3.0
- [request](https://npm.io/package/request.md) 2.81.0
- [winston](https://npm.io/package/winston.md) 2.3.1
- [bluebird](https://npm.io/package/bluebird.md) 3.5.0
- [ipfs-api](https://npm.io/package/ipfs-api.md) 14.0.0
- [node-etcd](https://npm.io/package/node-etcd.md) 5.0.3
- [body-parser](https://npm.io/package/body-parser.md) 1.17.1
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) 7.3.0
- [jsonapi-serializer](https://npm.io/package/jsonapi-serializer.md) 3.4.2

## Recent versions

- 0.8.0 (latest) — 2017-03-30
- 0.7.2 — 2016-08-17
- 0.7.1 — 2016-08-17
- 0.7.0 — 2016-08-16
- 0.6.0 — 2016-08-16
- 0.5.0 — 2016-07-26
- 0.4.0 — 2016-07-12
- 0.3.0 — 2016-06-21
- 0.2.2 — 2016-06-14
- 0.2.1 — 2016-06-14

## README

Antaeus - IPFS Gateway with hostname rewriting
==============================================
[![aegir](https://img.shields.io/badge/follows-aegir-blue.svg?style=flat-square)](https://github.com/dignifiedquire/aegir)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![Coverage Status](https://coveralls.io/repos/github/kanej/antaeus/badge.svg?branch=master)](https://coveralls.io/github/kanej/antaeus?branch=master)
[![Dependency Status](https://david-dm.org/kanej/antaeus.svg?style=flat-square)](https://david-dm.org/kanej/antaeus)
[![CircleCI](https://circleci.com/gh/kanej/antaeus.svg?style=svg)](https://circleci.com/gh/kanej/antaeus)
> The giant then reached out the hands in haste
> Whose mighty grip was felt by Hercules
> And took my guide. Feeling himself embraced,
> Virgil looked down and said: "Come closer, please:
> It's your turn." Inferno, Canto 31

Antaeus is a node webserver that wraps the IPFS daemon.
It allows you to define a mapping from a hostname to an IPFS address,
so that you can serve a website from IPFS on a root domain name.

Install
-------
Antaeus requires the ipfs client and daemon to be installed and running. It is packaged as an npm module:

```bash
$ npm install -g antaeus
```

This will install a command line program `antaeus` that can be used to start the webserver:

```bash
$ antaeus start --port 8080 --dnsConfig dnsMapping.json
```

The dns mapping file is a json map from hostnames to ipfs addresses:

```json
{
  "www.example.com": "/ipfs/QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u"
}
```

Once started, you will need to modify your hosts file to test the mapping in the browser.
You can test with `curl` more directly by setting the appropriate hostname:

```bash
$ curl -H 'Host: www.example.com' localhost:8080 # Hello World
```

The dns mapping file can be loaded from ipfs itself. The `dnsConfig` option accepts an ipfs address:

```bash
$ ipfs add dnsMapping.json
added QmeUrP9wiBxBv9GA7D22F8n5gNok4uMmBeZWkarmAwBJHD dnsMapping.json
$ antaeus start --port 8080 --dnsConfig QmeUrP9wiBxBv9GA7D22F8n5gNok4uMmBeZWkarmAwBJHD
```

Development
-----------
The main entry point is `src/index.js`, so to start the server for development run:
```bash
$ nodemon src/index test/exampleDNSConfig.json
```

To run the tests:
```bash
$ npm test
```

To lint the code:
```bash
$ npm run lint
```

To get the test coverage:
```bash
$ npm run coverage
```

License
-------
MIT

---
_Source: https://npm.io/package/antaeus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
