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

LocalDeploy

Symbols

  • LocalDeploymentObject
  • LocalDeployments
  • LocalDeploy
ToneAr`LocalDeploy`
LocalDeploy
​
LocalDeploy
[expr]
Deploys
expr
on localhost on any available port
​
​
LocalHost
[expr,port]
Deploys
expr
on localhost bound on
port
​
Details

Examples  
(5)
Basic Examples  
(1)
Create a simple local deployment serving static data on port 8080:
In[1]:=
dep=
LocalDeploy
[​​DateString[],​​8080​​]
Out[1]=
LocalDeploymentObject
Host Address: localhost
Host Port: 8080

The expression is evaluated once on deployment, and then the result served to each client:
In[2]:=
URLExecute[dep]
Out[2]=
"Fri 30 May 2025 15:37:52"
Using Delayed evaluates the expression each time a client makes a request:
In[3]:=
dep=
LocalDeploy
[​​Delayed[DateString[]],​​8080​​]
Out[3]=
LocalDeploymentObject
Host Address: localhost
Host Port: 8080

The expression is evaluated each time there is a request:
In[4]:=
URLExecute[dep]
Out[4]=
Fri 30 May 2025 15:38:01
URLDispatcher can be used to specify different routes:
In[5]:=
dispatch=URLDispatcher[{​​"/data/static"Now,​​"/data/delayed"Now,​​"/api"APIFunction[{​​"x""Number"​​},​​(#x^3&)​​]​​}];​​dep=
LocalDeploy
[dispatch,8080]
Out[5]=
LocalDeploymentObject
Host Address: localhost
Host Port: 8080

The Endpoints property will track these routes:
In[6]:=
dep["Endpoints"]
Out[6]=
/data/static
DateObject[
]
,/data/delayed
DateObject[
]
,/api
APIFunction[
]

You can pass the endpoint as a second argument to URLExecute used with a LocalDeploymentObject to hit that endpoint:
In[7]:=
TableForm@{​​URLExecute[dep,"data/static"],​​URLExecute[dep,"data/delayed"],​​URLExecute[dep,"api",{​​"x"3​​}]​​}
Out[7]//TableForm=
Fri 30 May 2025 16:12:50GMT+1
Fri 30 May 2025 16:12:51GMT+1
27
Dispose the LocalDeploymentObject and all associated tasks:
In[8]:=
Close[dep]
Out[8]=
127.0.0.1:8080
Scope  
(1)

Options  
(2)

Possible Issues  
(1)

SeeAlso
LocalDeployments
 
▪
LocalDeploymentObject
""

© 2026 Wolfram. All rights reserved.

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