Skip to content

TODO #1

Description

@joseluisq

User Cargo Workspace

  • Split up some modules in crates

Config Handler

  • DB connection
  • DB API
    • db::execute() - Executes a single SQL statement and returns the number of affected records
    • db::query() - Returns always an array of rows
    • db::query_row() - Returns always the first row and skips the others
    • db::query_one() - Strict, expects exactly one row to be returned

HTTP Handler

Expose an HTTP client (fetch) to Lua

  • Request type
    • Fields
    • status
    • uri
      • scheme
      • port
      • path
      • authority
      • query
    • headers
    • Methods
    • read
    • text
    • json
  • Client (fetch)
    • Implement fetch(method, URL, headers, payload)
    • Response type
      • Fields
      • status
      • url
        • scheme
        • port
        • path
        • authority
        • query
      • content_length
      • headers
      • Methods
      • read
      • text
      • json

Templating (Mini Jinja)

  • Expose a template engine API
    • render(name, table)
  • Add config feature

DB

  • Expose a DB connection API / sqlite for now
  • Add config feature

JSON

  • encode
  • decode

Basic static files support

  • Specific file serving (e.g. ./public dir)

Datetime

  • datetime

Regex

  • regex

Utils

  • dbg

Tracing

  • Add tracing
  • Add config feature for log levels

Configuration

  • Create a configuration TOML file
  • Support Lua features setup
  • Routes per file script support based on glob patterns with replacements
  • Basic set features (defaults).

Runtime

  • Crate API for adding custom Lua globals like.
  • Customizable Lua default globals.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions