Skip to content

RandivCosta/json-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-server

This is a backend server for ecommerce project. This is a simple fake JSON server that allows you to simulate a REST API using JSON files. It can be useful for testing purposes or for building prototypes without having to set up a real API server.

Getting Started

To use this fake JSON server, simply clone the repository to your local machine and install the required dependencies using the following command: npm install Once the dependencies are installed, you can start the server by running: node server This will start the server on http://localhost:5000.

Adding Data

To add data to the server, simply update db.json file by given format.for example if you want an endpoint name /users define array as "users".

Accessing Data

To access the data, simply make a GET request to the appropriate endpoint. For example, you can access it at http://localhost:3000/users.

Modifying Data

You can modify the data in the JSON file by editing them directly. Changes will be reflected immediately in the API responses.

About

This is a backend server for ecommerce project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published