Methods - API calls which can only be made on an object returned by a constructorĪPI Documentation Constants dateFormatString SignatureĪ format string, usable with os.date, which will display a date in the format expected for HTTP communications as described in RFC 822, updated by RFC 1123.Įxtensions/httpserver/httpserver_a line 1592.Constructors - API calls which return an object, typically one that offers API methods.Functions - API calls offered directly by the extension.Constants - Useful values which cannot be changed.Require("hs.doc.hsdocs").start() and then visiting with your web browser. You can start this web server by typing the following into your Hammerspoon console: It serves as a basic example of what is possible with this module. This web site can serve documentation for Hammerspoon dynamically generated from the json file included with the Hammerspoon application for internal documentation. While some of these limitations may be mitigated to an extent in the future with additional modules and additions to hs.httpserver, Hammerspoon's web serving capabilities will never replace a dedicated web server when volume or speed is required.Īn example web site is provided in the hsdocs folder of the hs.doc module. All document requests and responses are handled in memory only - because of this, maximum resource size is limited to what you are willing to allow Hammerspoon to consume and memory limitations of your computer.As with all Hammerspoon modules, while dynamic content is being generated, Hammerspoon cannot respond to other callback functions - a complex or time consuming script may block other Hammerspoon activity in a noticeable manner.It is single threaded within the Hammerspoon environment and can only serve one resource at a time.This module aims to provide a fully functional, and somewhat extendable, web server foundation, but will never replace a true dedicated web server application. Expanding upon the Hammerspoon module, hs.httpserver, this module adds support for serving static pages stored at a specified document root as well as serving dynamic content from Lua Template Files interpreted within the Hammerspoon environment and external executables which support the CGI/1.1 framework. This module aims to be a minimal, but (mostly) standards-compliant web server for use within Hammerspoon. Hammerspoon docs: hs.httpserver.hsminweb docs » hs.httpserver.hsminweb
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |