Skip to content

Server Generation and Website Deployment on Roku #678

Closed

Description

@LArroyoS

Hi @iBicha ,

I would like to ask if you could share how you manage to generate a server within Roku and, more specifically, how it is possible to deploy a website on it. I have a great interest in learning how to do this.

If possible, could you share any documentation, manual, or a basic example of how to do it? I don't fully understand the code's functionality.

Thank you in advance for your help and guidance.

Best regards,

Leonardo

Activity

  1. iBicha commented on Jul 18, 2025

    @iBicha
    Owner

    I have some docs, but not too deep https://github.com/iBicha/playlet/tree/main/docs#playlet-web-app

    Here are the pieces that make it work:
    First, the client is built from a svelte project from https://github.com/iBicha/playlet/tree/main/playlet-web but it can be any arbitrary html/js/css files. The build process spits the output files under playlet-lib/src/www.

    The second piece is the web server, Playlet has a web server that listens for tcp connections, parses and exchanges HttpMessages with the client. The server is a Task component that continuously listens for new connections and messages. The functionality of the web server is located here

    The server has milddewares (similar to most web servers out there) that allows me to specify specific handlers for certain paths/routes and methods (for example GET /index.html) that is setup here

    The static files are served using HttpStaticFilesRouter here, this way I can map url path to files from the playlet lib package.
    This router is also used to allow the web app to download logs for example.

    Here's one of the simplest routers in the server, it redirects from / to /index.html. From there, the HttpStaticFilesRouter router will serve the content of /index.html which allows the client to show the web app.

    The other routers allow me to have a somewhat "restful" api that connects between the client and the server, mostly communicating with json data.

    Finally, you might notice that some router functions are annotated, for example

            @get("/api/dash")
            function GenerateDashManifest(context as object) as boolean
                request = context.request
                response = context.response
    

    This is later interpreted by the web-server-plugin, so that this function is called when the method is a GET and the path is /api/dash - it's just to simplify my life since Playlet has many routers.

    There are other things to talk about (different headers, caching with etags, the fact that static files are already gzipped at build time, etc) but this is as good as general intro gets. Feel free to ask questions if you have specifics.

  2. iBicha commented on Jul 18, 2025

    @iBicha
    Owner

    Converting this issue to a discussion

  3. Repository owner locked and limited conversation to collaborators on Jul 18, 2025
  4. converted this issue into a discussion #680 on Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❓ questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions