Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

WebServer

Symbols

  • StartWebServer
ChristopherWolfram`WebServer`
StartWebServer
​
StartWebServer[content,port]
hosts a local web server containing
content
at the specified port.
​
Details and Options

Examples  
(4)
Basic Examples  
(3)
Start a web server hosting the word "test" at
http://localhost:3000
:
In[1]:=
StartWebServer
["test",3000]
​
Echo request information into the notebook:
In[1]:=
StartWebServer
[Delayed[Echo[HTTPRequest[HTTPRequestData[]]];"test"],3001]
»
HTTPRequest
URL:
http:///
ContentType: None

»
HTTPRequest
URL:
http:///test/dir
ContentType: None

»
HTTPRequest
URL:
http:///test/dir?arg=value
ContentType: None

​
Host a website with several pages, containing APIs, forms, and dynamically-generated content:
In[1]:=
StartWebServer
[​​URLDispatcher[{​​"/api"APIFunction["x""String"],​​"/form"FormFunction["x""String"],​​"/image"Delayed[RandomImage[1,{1000,1000},ColorSpace"RGB"]]​​}],​​3000​​]
Scope  
(1)

SeeAlso
SocketListen
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com