https://github.com/pablopunk/apios
🌱Automatic API for mongodb
https://github.com/pablopunk/apios
Last synced: about 1 year ago
JSON representation
🌱Automatic API for mongodb
- Host: GitHub
- URL: https://github.com/pablopunk/apios
- Owner: pablopunk
- Created: 2018-09-07T15:43:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-01T16:41:31.000Z (about 7 years ago)
- Last Synced: 2025-03-03T00:34:23.015Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://apios.pablopunk.now.sh
- Size: 59.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🌱 apios
## Introduction
*Apios* is a web server that automatically exposes an API for a mongodb database. *If you have a database, you have an API*.
## Usage
First, clone this repo ([or use now.sh](#deploy))
```bash
$ git clone https://github.com/pablopunk/apios
$ cd apios
$ npm install
```
Then enter the paramenters of your database inside a `.env` file:
```sh
# .env
DB_URL=mongodb://my-url.com:1234/db-name
DB_USER=pablo
DB_PASS=pass42
```
That's it. Now run the server:
```bash
$ npm start
```
Now go to http://localhost:3000 and you'll see a list of your database collections.
If you want to retrieve an specific collection, use the name of the collection after the URL: http://localhost:3000/animals
>More coming soon...
## Deploy
I personally use [now.sh](http://now.sh) to deploy this as it's super easy, fast and secure:
```bash
$ now -e DB_URL=mongodb://.../dbName -e DB_USER=you -e DB_PASS=1234
```
## Related
* *WIP*. Rust implementation of this repo: [rust-apios](https://github.com/pablopunk/rust-apios)
## License
MIT
## Author
|  |
| --------------------------------- |
| [Pablo Varela](https://pablo.life) |