https://github.com/trikanna/cra-json-server
create-react-app + json-server
https://github.com/trikanna/cra-json-server
create-react-app json-server react styled-components
Last synced: about 1 year ago
JSON representation
create-react-app + json-server
- Host: GitHub
- URL: https://github.com/trikanna/cra-json-server
- Owner: trikanna
- Created: 2017-07-26T03:09:05.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-26T03:11:30.000Z (almost 9 years ago)
- Last Synced: 2025-03-26T13:11:57.053Z (about 1 year ago)
- Topics: create-react-app, json-server, react, styled-components
- Language: JavaScript
- Size: 251 KB
- Stars: 9
- Watchers: 0
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# create-react-app + json-server
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app) & [typicode/json-server](https://github.com/typicode/json-server)

## setup
```npm install``` & ```npm start```
### db.json
```json
{
"posts": [
{
"id": 1,
"title": "this is the first element on the collection",
"authorId": 1
},
{
"id": 2,
"title": "And now time for a second one...",
"authorId": 2
},
{
"id": 3,
"title": "... and the last one.",
"authorId": 1
}
],
"authors": [
{
"id": 1,
"name": "Santiago Camelo",
"email": "trikanna@gmail.com"
},
{
"id": 2,
"name": "Pepe Trueno",
"email": "pepetrueno@gmail.com"
}
]
}
```
### api call
```http://localhost:4000/authors?_embed=post```