Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobkyalo/json-server
A React App that uses a fake REST API from json-server to display employees details.
https://github.com/jacobkyalo/json-server
Last synced: 28 days ago
JSON representation
A React App that uses a fake REST API from json-server to display employees details.
- Host: GitHub
- URL: https://github.com/jacobkyalo/json-server
- Owner: Jacobkyalo
- Created: 2022-07-25T11:06:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-15T15:50:59.000Z (about 2 years ago)
- Last Synced: 2023-03-05T04:54:37.380Z (almost 2 years ago)
- Language: JavaScript
- Homepage: json-server-henna.vercel.app
- Size: 685 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Employee Tracker
A React App that uses a fake REST API from json-server to display employees details.
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.The page will reload when you make changes.\
You may also see any lint errors in the console.### `npm run server`
Runs the json-server\
Open [http://localhost:5000/employees](http://localhost:5000/employees) to view json data in your browser.### Fetching all employees
Use:
```
fetch(`http://localhost:5000/employees`)
```### For single Employee
Use:
```
fetch(`http://localhost:5000/employees/${id}`)
```