{"id":"hawdevelopment/express","name":"express","scope":"hawdevelopment","platform":"roblox","description":"Easy to use remote handler/wrapper","version":"1.0.1","latest":"1.0.1","versions":["1.0.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":["The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{},"integrity":"221b66896ffda15f126671a4a24a292f56441c2bc36fac049ad01d50b6b689c9","likes":0,"downloads":0,"install":"forest install hawdevelopment/express","url":"https://forest.dev/p/roblox/hawdevelopment/express","files":"https://api.forest.dev/ai/package/roblox/hawdevelopment/express/files","readme":"# Ro-Express\r\n\r\nExpressjs like Networking module that makes it easier to write and organise code.\r\n\r\nRead the [documentation](https://hawdevelopment.github.io/Ro-Express/) for more info.\r\n\r\n---\r\n\r\nRo-Express allows you to register methods to a path, and then attaching middleware to paths. It helps clear up complex structures to nice trees of remotes. When requesting data you get a status back to easily check what when right and wrong.\r\n\r\n``` lua\r\nlocal express = require(game:GetService(\"ReplicatedStorage\").express)\r\n\r\nlocal app = express()\r\n\r\n-- Registering a GET method\r\napp:get(\"/GetHugs\", function(request, response)\r\n    response:status(200):send(\"Hugs 🤗\")\r\nend)\r\n\r\n-- Attaching middleware to the GET method\r\napp:use(\"/GetHugs\", function(request, response)\r\n    \r\n    local name = request.Player.Name\r\n    if not (name == \"Sleitnick\" or name == \"Elttob\") then\r\n        -- Lock the response if not authorized\r\n        response:status(401):done()\r\n    end\r\nend)\r\n\r\napp:Listen(\"Hugs\")\r\n``` \r\n\r\nWhen Requesting data it will return a nice table with all your needs.\r\n\r\n``` lua\r\nlocal express = require(game:GetService(\"ReplicatedStorage\").express)\r\n\r\nlocal Return = express.Request(\"Hugs://GetHugs\", \"GET\")\r\n\r\n-- (If you are cool)\r\nprint(Return) -> {\r\n    Succes = true,\r\n    Status = 200,\r\n    Body = \"Hugs 🤗\"\r\n}\r\n```","readmeTruncated":false}