Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Mokup: A Build-Tool-Friendly Visual Mocking Tool for Vite, Webpack, Node.js, and Workers

Mokup: A Build-Tool-Friendly Visual Mocking Tool Hi, I am icebreaker, a frontend developer and open source enthusiast. I want to share a project I have been working on recently: Mokup, a file-based HTTP mocking tool. Project links:…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Mokup: A Build-Tool-Friendly Visual Mocking Tool



Hi, I am icebreaker, a frontend developer and open source enthusiast.



I want to share a project I have been working on recently: Mokup, a file-based HTTP mocking tool.



Project links: GitHub, docs site: http://mokup.icebreaker.top/






What is Mokup



Logo



Mokup is a file-based HTTP mocking tool. You put mock files in the mock/ directory, and it automatically scans them, builds matching routes, and returns responses.



Its goal is straightforward: help mocks run quickly inside your existing frontend project, and reduce the cost of building a separate service just for API collaboration.






Key features




  • Build-tool friendly: works with both Vite and Webpack without forcing a project rewrite.

  • Visual debugging: built-in Playground, so route status is visible at a glance.

  • Great developer experience: mock file and config updates refresh automatically, without frequent restarts.

  • Deployable to multiple environments: local dev, Node.js server, Worker, and Service Worker.






Why I built it



For many teams, the pain is not writing mocks. The pain is:




  • Too many setup steps, and reconfiguration every time the build tool changes.

  • Poor visibility during local debugging, so people guess by reading files.

  • Slow feedback loops when every mock change needs a restart or manual verification.



Mokup is designed to solve these three issues: lighter setup, stronger visualization, and faster feedback.






Build-tool friendly






Vite integration






import mokup from 'mokup/vite'

export default {
plugins: [
mokup({
entries: { dir: 'mock', prefix: '/api' },
}),
],
}






At this point, you can add files under mock/, and Mokup will scan them and generate routes automatically.



You can also open Mokup Playground from your CLI output for visual debugging.



CLI






Webpack integration






const { mokupWebpack } = require('mokup/webpack')

const withMokup = mokupWebpack({
entries: { dir: 'mock', prefix: '/api' },
})

module.exports = withMokup({})






This lets you add mock capability into your existing build pipeline without changing your business code structure.






Visualization: Playground (highlight)



Mokup includes a built-in Playground to inspect scanned routes, methods, paths, and config chains.



Default entry in Vite dev:




http://localhost:5173/__mokup






Online demo: https://mokup.icebreaker.top/__mokup/



Playground entry



It solves a practical problem:

when an endpoint does not work, you do not need to grep everywhere. Open the page and you can immediately see whether the route was scanned, disabled, and which config matched.





Developer experience: what supports hot reload



In Vite dev, Mokup watches mock directories and refreshes the route table automatically. Typical changes that trigger hot reload include:




  • Add/modify/delete route files, for example:


    • mock/users.get.ts

    • mock/messages.get.json

    • mock/orders/[id].patch.ts



  • Modify directory config files: mock/**/index.config.ts

  • Change directory structure (move, rename, create nested folders)



After changes, Playground refreshes route lists automatically, making debugging much faster.

If you do not need file watching, set watch: false in entries.





Quick example: from file to response





// mock/users.get.ts
import { defineHandler } from 'mokup'

export default defineHandler({
handler: c => c.json([{ id: 1, name: 'Ada' }]),
})





Start dev and visit /api/users (assuming you set prefix: '/api'), then you get mock data.



Mock Dir Tree





Quick integration with @faker-js/faker



Mokup handlers are plain TS/JS functions, so you can integrate with @faker-js/faker directly, without any extra adapter layer.



This example returns a user list based on the size query parameter:




// mock/users.get.ts
import { faker } from '@faker-js/faker'
import { defineHandler } from 'mokup'

export default defineHandler((c) => {
const size = Number(c.req.query('size') ?? 10)
const count = Number.isNaN(size) ? 10 : Math.min(Math.max(size, 1), 50)
const list = Array.from({ length: count }, () => ({
id: faker.string.uuid(),
name: faker.person.fullName(),
email: faker.internet.email(),
city: faker.location.city(),
createdAt: faker.date.recent({ days: 30 }).toISOString(),
}))

return c.json({
list,
total: 200,
page: 1,
pageSize: count,
})
})






This is very useful for list, search, and detail page integration.

If you need reproducible results, add faker.seed(123) at the top of the handler.





Deployable to multiple environments



The same mock setup can run in multiple environments: for example, directly in Node.js, and also deployed to Cloudflare Workers.



Node.js dev mode example:




import { createFetchServer, serve } from 'mokup/server/node'

const app = await createFetchServer({ entries: { dir: 'mock' } })
serve({ fetch: app.fetch, port: 3000 })






Cloudflare Worker example:




import { createMokupWorker } from 'mokup/server/worker'
import mokupBundle from 'virtual:mokup-bundle'

export default createMokupWorker(mokupBundle)






Note: virtual:mokup-bundle is only available in Vite with @cloudflare/vite-plugin. In Node.js dev mode, use createFetchServer directly and you do not need that virtual module.






Core architecture



architecture






Use cases and boundaries



Good fit:




  • Teams with existing Vite/webpack projects that want low-cost mock integration

  • Projects that need visual route diagnostics

  • Workflows that value fast feedback after mock updates



Less suitable:




  • Scenarios that depend heavily on complex dynamic proxy chains

  • Extremely lightweight setups that do not want build-time or plugin-based integration



Mokup is not trying to replace every mock solution. It is designed to make mocks easier to adopt, easier to debug, and better aligned with everyday development workflows.






Closing



Mokup is still evolving quickly. Feedback is very welcome, including feature requests, DX feedback, and documentation improvements.



If this is useful for your workflow, feedback and feature requests are welcome:

https://github.com/sonofmagic/mokup

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - Mokup: A Build-Tool-Friendly Visual Mocking Tool for Vite, Webpack, Node.js, and Workers
id: 7bec1bc9-cf34-4b27-9454-f032f002a0fd
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-25
logsource:
  category: network_connection
  product: any
detection:
  selection:
      DestinationHostname:
        - 'mokup.icebreaker.top'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-25"
        description = "YARA Signature for "
    strings:
        $str = "Mokup: A Build-Tool-Friendly V" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
(dest_host="mokup.icebreaker.top")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
destination.domain: ("mokup.icebreaker.top") and event.category: "network"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where DestinationHostName in ("mokup.icebreaker.top")
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

IoC Intelligence (1 Indikatoren)
mokup[.]icebreaker[.]top
CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Mokup: A Build-Tool-Friendly Visual Mock.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Mokup: A Build-Tool-Friendly Visual Mocking Tool for Vite, Webpack, Node.js, and Workers

Thematisch verwandte Begriffe: Mokup, BuildToolFriendly, Visual, Mocking · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97818 | phpIPAM through 1.8.3 has incorrect authorization for id=="admins" and i…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag