Module webify

Webify is an unopinionated web framework, based on express.js syntax, its GitHub is at [](https://github.com/knijn/webify)

Info:

  • License: MIT
  • Author: EmmaKnijn

Functions

client.addMiddleware (func) Adds a middleware, they allow you to make changes to the req and res objects before they reach your handlers
client.get (path, func) Adds a GET request to the stack The callback function will be ran on a matching GET request
client.post (path, func) Adds a POST request to the stack The callback function will be ran on a matching POST request
client.put (path, func) Adds a PUT request to the stack The callback function will be ran on a matching PUT request
client.patch (path, func) Adds a PATCH request to the stack The callback function will be ran on a matching PATCH request
client.delete (path, func) Adds a DELETE request to the stack The callback function will be ran on a matching DELETE request
client.run (num) Runs the listener The callback function will be ran on a matching DELETE request
webify () Creates a client object


Functions

client.addMiddleware (func)
Adds a middleware, they allow you to make changes to the req and res objects before they reach your handlers

Parameters:

  • func A function to call

Returns:

    nil
client.get (path, func)
Adds a GET request to the stack The callback function will be ran on a matching GET request

Parameters:

  • path The path that will be checked against, "/" by default
  • func A callback function

Returns:

    nil
client.post (path, func)
Adds a POST request to the stack The callback function will be ran on a matching POST request

Parameters:

  • path The path that will be checked against, "/" by default
  • func A callback function

Returns:

    nil
client.put (path, func)
Adds a PUT request to the stack The callback function will be ran on a matching PUT request

Parameters:

  • path The path that will be checked against, "/" by default
  • func A callback function

Returns:

    nil
client.patch (path, func)
Adds a PATCH request to the stack The callback function will be ran on a matching PATCH request

Parameters:

  • path The path that will be checked against, "/" by default
  • func A callback function

Returns:

    nil
client.delete (path, func)
Adds a DELETE request to the stack The callback function will be ran on a matching DELETE request

Parameters:

  • path The path that will be checked against, "/" by default
  • func A callback function

Returns:

    nil
client.run (num)
Runs the listener The callback function will be ran on a matching DELETE request

Parameters:

  • num

Returns:

    nil
webify ()
Creates a client object

Returns:

    tbl The client object
generated by LDoc 1.4.6 Last updated 2023-02-23 09:09:21