Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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!
- Host: GitHub
- URL: https://github.com/alibahaari/json-spot
- Owner: AliBahaari
- Created: 2021-10-13T14:16:06.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-23T08:45:39.000Z (about 3 years ago)
- Last Synced: 2024-11-07T19:34:35.910Z (2 months ago)
- Topics: node-js, nodejs, npm, npm-module, npm-package, npm-script
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/json-spot
- Size: 11.7 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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/)