Coder Social home page Coder Social logo

json-server-deploy's Introduction

JSON Server is an easy and quick-to-set-up module that you can use to fake or mock an API.

Project Structure

images/
.DS_Store
.gitattributes
.gitignore
LICENSE.md
README.md
db.json
package.json
server.js
yarn.lock

Usage (run on your machine)

Prerequisites

  • Node ^14.15.4 or above
  • Yarn ^1.22.19 or above

Steps

  • Clone the Repository
  • Install the Dependencies
  • Run the Project

Clone the Repository

You can clone the repo or download the zip file.
To clone:

git clone https://github.com/KSAURAVSINGH/json-server-deploy.git

Install the Dependencies

There is only one dependency we need to install - json-server

Install json-server

yarn add json-server

Run the Project

json-server --watch db.json

You should see a file named db.json created in the folder. When you run the server locally, it tries to search for the file (db.json) and if not found, it creates a file on its own with mock JSON data.

It’ll run your server locally on http://localhost:3500
To change the PORT, go to server.js file and change the port number mentioned there.

Dependencies Used

Name Version
json-server ^0.17.0

Visual Representation of Project

Screenshot 2022-12-10 at 3 00 01 PM

Screenshot 2022-12-10 at 3 00 30 PM

Screenshot 2022-12-10 at 3 00 42 PM

Screenshot 2022-12-10 at 3 00 54 PM

Resources

Contact Me

[email protected]

json-server-deploy's People

Contributors

ksauravsingh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.