Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Easily create a local web server for hosting APIFunctions, FormFunctions, URLDispatchers, etc.
Contributed by: Christopher Wolfram
Uses the Foreign Function Interface (FFI) to link to uWebSockets entirely in WL code.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["ChristopherWolfram/WebServer"]
To load the code after installation, evaluate this code:
Needs["ChristopherWolfram`WebServer`"]
Start a web server hosting the word "test" at http://localhost:3000:
| In[1]:= |
Echo request information into the notebook:
| In[2]:= |
Host a website with several pages, containing APIs, forms, and dynamically-generated content:
| In[3]:= | ![]() |
It is possible to launch a web server in a subkernel using LocalSubmit:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
Other evaluations can be performed while the web server runs in the subkernel:
| In[5]:= |
| Out[5]= |
| In[6]:= |
| Out[6]= | ![]() |
Wolfram Language Version 13.3