web-server.dev

web-server.dev

A development web server and reverse proxy

Download now Use cases

Features .

Serve files from local folder(s)

A local HTTP server to host HTML / JS / CSS files during development — typically required for advanced browser features (service worker, clipboard, ...) Multiple source folders supported.

Reverse proxy API calls

A single frontal server to forward API calls to local or remote APIs — simplify the development setup, no CORS required

Simple

Open source

Use case 1 .

Host static files during development

Some browser features may be disabled when opening the files from file system and need an HTTP server.

Useful for projects where a dev server is not already created.

// settings.json
{
  "routes": {
    "/": "~/my-website/"
  }
}
                    

Use case 2 .

Serve front-end files from local folder and proxy API calls to a back-end system

Removes the need to configure CORS on the back-end, since the browser sees everything as a single web server.

// settings.json
{
  "routes": {
    "/": "~/my-website/",
    "/api" : "http://my-api.dev/"
  }
}
                    

Use case 3 .

Serve files from multiple folders

For instance, a home page and a documentation site — or a landing page and an app.

// settings.json
{
  "routes": {
    "/app": "~/my-app/",
    "/docs": "~/my-docs/"
  }
}
                    

Use case 4 .

Group multiple endpoints behind a single access point

For instance, a public API and a private API — or an API and a solution for Analytics.

// settings.json
{
  "routes": {
    "/api": "http://my-api.dev/",
    "/private": "http://localhost:3000/"
  }
}