Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

miragejs createServer timing

import { createServer } from "miragejs";

createServer({
  timing: 5000, // Response time: 5000ms
  routes() {
    this.namespace = "api";
    this.get("/products", () => {
      return ["MacBook", "iPad"];
    });
  }
});
 
PREVIOUS NEXT
Tagged: #miragejs #createServer #timing
ADD COMMENT
Topic
Name
8+5 =