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.
A single frontal server to forward API calls to local or remote APIs — simplify the development setup, no CORS required
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/" } }
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/" } }
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/" } }
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/" } }