Giter Site home page Giter Site logo

Server configs about plezi HOT 4 CLOSED

tannevaled avatar tannevaled commented on May 21, 2024
Server configs

from plezi.

Comments (4)

boazsegev avatar boazsegev commented on May 21, 2024

The Plezi framework uses the iodine HTTP/WebSocket server for WebSocket and Pub/Sub support.

Setting the port number depends on the way you start your application.

If you're starting your application using the rackup command, use the -p option to set the port. i.e.:

 $ bundle exec rackup -p 8000

If you're starting the plezi framework using the iodine command line, use the -p option to set the port (use -? for a list of options). i.e.:

$  bundle exec iodine -p 8000 -www ./public

If you're using a procfile, you might need to update the port in the procfile. i.e.:

web: bundle exec iodine -p $PORT -www ./public

Might become:

web: bundle exec iodine -p 8080 -www ./public

However, if you're using the default procfile, it would be better to set the ENV variable PORT to the number you want (i.e. PORT=8080).

from plezi.

tannevaled avatar tannevaled commented on May 21, 2024

hmmm, ok.
so no way to set it programmatically?
like
Iodine::Rack.public = File.expand_path('../../public',dir)
Iodine::Rack.log = true
Iodine::Rack.port = 6666

i tried but it doesn't work ;)

from plezi.

boazsegev avatar boazsegev commented on May 21, 2024

Setting the port and logging manually using the Iodine::Rack properties works perfectly on my machine.

Are you sure you're setting these options before the server starts running?

Without knowing how you're starting up your server, I can't really know how to fix this.

For example, if you're using rackup, than it might reset the port property after your code was executed.

from plezi.

tannevaled avatar tannevaled commented on May 21, 2024

ok, it is that.

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.