Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alibahaari/json-spot

Create your projects JSON sample APIs!
https://github.com/alibahaari/json-spot

node-js nodejs npm npm-module npm-package npm-script

Last synced: 17 days ago
JSON representation

Create your projects JSON sample APIs!

Awesome Lists containing this project

README

        

# json-spot

Create a sample API for your projects due to your need easily.

## Usage/Examples

First install the package globally:
```bash
npm i -g json-spot
```

Next, create `db.json` in the root of your project containing API sample data:
```json
{
"posts": [
{
"id": 1,
"title": "Title 1"
},
{
"id": 2,
"title": "Title 2"
},

...

]
}
```
*A sample file is witihin `samples/` folder.*

Then, use `json-spot` command for running the API:
```bash
json-spot --db --port
```
The default of `` and `` options are `db.json` and `4000`. So if these values satisfy you, you can leave them blank.

Now, open your browser and enter the address below:
```bash
localhost:4000
```

Congratulation! Your API is ready!

## Methods

`json-spot` supports `GET`, `POST`, `DELETE` and `PUT` HTTP request methods for manipulating APIs you would create and run.

## License

[MIT](https://choosealicense.com/licenses/mit/)