Skip to content

Commit

Permalink
fix: fix dev server mocks (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey authored Jul 7, 2023
1 parent 7f81973 commit e02ab14
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mocks/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
const { rest } = require("msw");
const { setupServer } = require("msw/node");

const server = setupServer();
// put one-off handlers that don't really need an entire file to themselves here
const miscHandlers = [
rest.post(`${process.env.REMIX_DEV_HTTP_ORIGIN}/ping`, (req) =>
req.passthrough()
),
];

const server = setupServer(...miscHandlers);

server.listen({ onUnhandledRequest: "bypass" });
console.info("🔶 Mock server running");
Expand Down

0 comments on commit e02ab14

Please sign in to comment.