Home / Function/ createServer() — vite Function Reference

createServer() — vite Function Reference

Architecture documentation for the createServer() function in worker.js from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  dda26bb3_a216_2d6c_7723_c6644964fadb["createServer()"]
  535629ca_edbf_7594_a456_39f4ffa46efd["worker.js"]
  dda26bb3_a216_2d6c_7723_c6644964fadb -->|defined in| 535629ca_edbf_7594_a456_39f4ffa46efd
  style dda26bb3_a216_2d6c_7723_c6644964fadb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

playground/ssr-webworker/worker.js lines 6–18

export async function createServer(port) {
  const mf = new Miniflare({
    scriptPath: path.resolve(
      import.meta.dirname,
      'dist/worker/entry-worker.js',
    ),
    port,
    modules: true,
    compatibilityFlags: ['nodejs_compat'],
  })
  await mf.ready
  return { mf }
}

Domain

Subdomains

Frequently Asked Questions

What does createServer() do?
createServer() is a function in the vite codebase, defined in playground/ssr-webworker/worker.js.
Where is createServer() defined?
createServer() is defined in playground/ssr-webworker/worker.js at line 6.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free