Giter Site home page Giter Site logo

Comments (3)

boazsegev avatar boazsegev commented on May 17, 2024

Hi @algofoogle ,

I apologize if things take time - these are busy times for me.

Perhaps the definition of "assets" in the documentation is unclear, but "assets" refers only to dynamic assets that require "rendering" or "baking".

This would be SCSS files that need to be rendered as CSS files, or CoffeeScript files that need to be rendered as Javascript files.

The :assets router will not render any jpg files, since they don't require to be rendered.

You could, of course, Plezi:: AssetBaker.register a "driver" for jpg files (that driver would do nothing except load the file to memory)...

...but the correct way to serve static files would be to setup the server to serve static files from the Public folder.

If you're using the latest version of Plezi's default server (iodine, 0.7.38), the correct way to set up a public folder (for serving static files) would be to either (in code / irb):

Iodine::DEFAULT_HTTP_ARGS[:public] = './public'

Or, from the command line, when starting iodine:

$ iodine -www ./public

You can run iodine -? or iodine -h to list all the command line interface options.

P.S.

Also, I should note that most of Plezi's features (except for the router, renderer and asset baking) have been transferred into the iodine gem (the default server).

Originally, Plezi "hijacked" connection to enable real-time updates and pub/sub. However, this resulted in code duplication between the server IO management system and the WebSocket management system - so both systems were unified under the "iodine" Ruby server.

Since not many people actually use Plezi, the current long term plan is to move as much as possible from Plezi to the iodine server, so Plezi remains as simple as possible and requires minimal maintenance. The iodine server will also move from development to maintenance once it matures (as it appears to have almost done).

from plezi.

amm-catapult avatar amm-catapult commented on May 17, 2024

Ah great, thanks @boazsegev :) Iodine::DEFAULT_HTTP_ARGS[:public] = './public' is what I needed. I will try that soon.

I had previously submitted a pull request for getting involved with improving documentation. If you are happy with that one, I will try to submit another that includes more about assets, asset baking, and perhaps this example too.

I was interested first in Plezi because I didn't like having to set up such a huge stack as Rails 6 just to start learning how to do some things with WebSockets in Ruby. Now I will study more about iodine, too :)

Thanks!

from plezi.

boazsegev avatar boazsegev commented on May 17, 2024

Thanks for the PR and your kind help.

Have fun and good luck with everything! 👏🏻👏🏻👍🏻

from plezi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.