https://github.com/leosimoes/nodejs-json-server-simpleapi
Simple API in JSON with JSON Server and NodeJS.
https://github.com/leosimoes/nodejs-json-server-simpleapi
json json-server nodejs rest-api
Last synced: 2 months ago
JSON representation
Simple API in JSON with JSON Server and NodeJS.
- Host: GitHub
- URL: https://github.com/leosimoes/nodejs-json-server-simpleapi
- Owner: leosimoes
- Created: 2023-12-21T20:29:00.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-21T22:30:00.000Z (over 2 years ago)
- Last Synced: 2025-03-24T20:43:39.274Z (over 1 year ago)
- Topics: json, json-server, nodejs, rest-api
- Language: JSON
- Homepage:
- Size: 219 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NodeJS - JsonServer - SimpleAPI
Simple JSON API with JSON Server and NodeJS.
The project development steps were:
1. Open the terminal in the desired directory: `cd /d D:\Projetos\WebStorm\NodeJS-JsonServer-SimpleAPI`;
2. Initialize the Node.js project with a package.json file: `npm init -y` or `npm init`;
3. Install JSON Server in the project: `npm install json-server`;

4. Create `data/` directory and `db.json` file inside it;
5. Insert the data into `db.json`;
6. In `package.json`, add the key-value `"api" : "json-server --watch data/db.json"` in `"scripts"`;
7. Start the server: `npm run api`.
