JS - Mocking a REST API with JSON Server

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • json-server

    Get a full fake REST API with zero coding in less than 30 seconds (seriously)

    I'm not going to dive deep into all of the possibilities because they are endless. It's worth taking a look at the full documentation in their Github to take advantage of its full power.

  • berry

    📦🐈 Active development trunk for Yarn ⚒

    Considering you have already created the main structure of your project using NPM or Yarn, install the package to your project using one of the following commands:

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • Lowdb

    Simple to use local JSON database. Powered by plain JavaScript (supports Node, Electron and the browser)

    JSON Server works based on Low DB a "Tiny local JSON database for small projects". So you need to configure a db.json file that will serve the data.

  • js-json-server-mock-api

    You can find a fully-working example in this repository.

  • Express

    Fast, unopinionated, minimalist web framework for node.

    JSON Server will act like a simplified Express server, so, this is how you create the main file required by it to run:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts