# @anyapi/anyapi

> anyapi is a generic, store anything api implemented in node.js using restify and mongodb

Latest version **1.1.1** (published 2021-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @anyapi/anyapi
pnpm add @anyapi/anyapi
yarn add @anyapi/anyapi
bun add @anyapi/anyapi
```

Provides the command `anyapi`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-02-22 |
| First published | 2021-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 41.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | rorycombe |

## Links

- npm: https://www.npmjs.com/package/@anyapi/anyapi
- Repository: https://github.com/RoryCombe/anyapi
- Issues: https://github.com/RoryCombe/anyapi/issues
- npm.io page: https://npm.io/package/@anyapi/anyapi

## Dependencies (11)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [clear](https://npm.io/package/clear.md) ^0.1.0
- [lowdb](https://npm.io/package/lowdb.md) ^1.0.0
- [tslib](https://npm.io/package/tslib.md) ^2.1.0
- [dotenv](https://npm.io/package/dotenv.md) ^8.2.0
- [figlet](https://npm.io/package/figlet.md) ^1.5.0
- [mongodb](https://npm.io/package/mongodb.md) ^3.1.13
- [restify](https://npm.io/package/restify.md) ^8.5.1
- [date-fns](https://npm.io/package/date-fns.md) ^2.17.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [restify-errors](https://npm.io/package/restify-errors.md) ^8.0.2

## Recent versions

- 1.1.1 (latest) — 2021-02-22
- 1.1.0 — 2021-02-22
- 1.0.3 — 2021-02-22
- 1.0.2 — 2021-02-21
- 1.0.1 — 2021-02-21

## README

<div align="center">
  <h1>any API 🤖</h1>
  <p>A simple, zero config RESTful api that takes whatever you want to throw at it</p>
</div>

---

![GitHub Workflow Status](https://img.shields.io/github/workflow/status/rorycombe/anyapi/validate?logo=github&style=flat-square)
[![codecov](https://codecov.io/gh/RoryCombe/anyapi/branch/master/graph/badge.svg?token=S462N7D27B)](https://codecov.io/gh/RoryCombe/anyapi)

## Getting Started

```
npx @anyapi/anyapi
```

or

```
npm i @anyapi/anyapi -g
anyapi
```

This will start the server on the default port of `2000`. Using any HTTP client you can now `GET`, `POST`, `PUT`, `DELETE` with a collection type that is completely variable and up to you.

For example `hamburgers`:

```
fetch('http://localhost:2000/hamburgers', {
  method: 'POST',
  body: JSON.stringify({ name: 'Cheese Burger', ingredients: ['beef', 'tomato', 'lettuce', 'cheese'] }),
  headers: new Headers({'Content-Type': 'application/json'})
})
```

Then GET on `http://localhost:2000/hamburgers` to see your new collection

## Methods

- `GETALL` on `:collection`
- `GET` on `:collection` with `:id`
- `CREATE` on `:collection` with `:data`
- `UPDATE` on `:collection` with `:id` and `:data`
- `DESTROY` on `:collection` with `:id`

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