Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: "sencha app watch" proxy configuration

  1. #1
    Sencha Premium Member
    Join Date
    Jun 2013
    Location
    Frankfurt, Germany
    Posts
    6

    Question "sencha app watch" proxy configuration

    Hi all,

    is there any possibility to configure a proxy when using "sencha app watch" cmd ?

    The command is starting a webserver on localhost:1841

    What I want to do is to be able to configure a specific path on the URL which should be redirected to another machine/port

    E.g
    http://localhost:1841/rest
    /rest should be redirected (configurable) to localhost:8080/rest

    Maybe similiar configuration options as availble here (maybe simpler/less): https://github.com/drewzboto/grunt-connect-proxy

  2. #2
    Sencha Premium Member
    Join Date
    Jun 2013
    Location
    Frankfurt, Germany
    Posts
    6

    Default

    Ok, maybe to get some feedback

    Implementation hints/discussion or just some opinions
    Open items:
    - detailed implementation
    - configuration possibilities

    com.sencha.util.http Server.class
    PHP Code:
    // new, more glue code skipped
    private createProxyConfigObject(String pathString hostint port) {
        return new 
    ProxyConfigObject(pathhostport);
    }


    // existing, to be modified
    private Server(Responder responderint port) {
        
    this(port);
        if(
    responder instanceof Member) {
            ((
    Member)responder).join(this._stopper);
        }


        
    /* modifcation
        - missing parameters (proxyPath, proxyHost, proxyPort) must be configurable
        - must be able to use multiple remote configurations (loop needed) */
        
    ProxyConfigObject pco this.createProxyConfigObject(proxyPathproxyHostproxyPort);
        
    this.mount(pco, (Responder)responder);


        
    // original
        
    this.mount("/", (Responder)responder);
    }


    // new mount for remote ProxyConfigObject
    public void mount (ProxyConfigObject pco) {
        
    // http://download.eclipse.org/jetty/stable-8/apidocs/org/eclipse/jetty/servlets/ProxyServlet.Transparent.html#proxyHttpURI(java.lang.String,%20java.lang.String,%20int,%20java.lang.String)
        // use ProxyServlet.Transparent


        // ...
        // more glue code within here


        
    context.addServlet(new ProxyServlet.Transparent(pco.getPath(), pco.getHostpco.getPort() ), "/" pco.getPath());
        
    // ...

    com.sencha.util.http DispatchServlet.class
    PHP Code:
    /*
        remote proxy urls must be excluded from being dispatched, stackoverflow example
        http://stackoverflow.com/questions/3125296/can-i-exclude-some-concrete-urls-from-url-pattern-inside-filter-mapping
    */ 

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2013
    Location
    Frankfurt, Germany
    Posts
    6

    Default

    Hi,

    any update/feedback from any of the Sencha CMD devs ?

    kind regards,

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2008
    Posts
    387

    Default

    +1, want to know this as well!
    I`m from Holland!

  5. #5
    Sencha Premium User
    Join Date
    Jun 2008
    Posts
    132

    Default

    +1 Has anyone figured out how to do this with Cmd 5?

  6. #6
    Sencha Premium Member EPV's Avatar
    Join Date
    Dec 2010
    Location
    Sweden
    Posts
    361

    Default

    + 1

    If you have configurations in your own web server that's needed (vhost with proxyPass, Alias etc.) it's impossible to use sencha cmd built in server.

    I have posted i thread about Fashion+Configurable web server in the premium forums:
    https://www.sencha.com/forum/showthr...own-webbserver

    / E

  7. #7
    Sencha Premium Member
    Join Date
    Jul 2015
    Posts
    33

    Default

    +1 I would have thought this was a common requirement. If we can't do this with CMD is there any workarounds people know off? Currently I host my ExtJS app in a JVM Embedded Jetty. Great for deployment but poor for development as I miss out on all the features of CMD.
    Cheers Herbie

  8. #8
    Sencha Premium User
    Join Date
    Jan 2010
    Posts
    62

    Default

    +1
    This is last bit of the puzzle for us, in order to use Sencha Cmd as it is intended. It does not make sense to run our applications without access to the web services.

  9. #9
    Sencha Premium Member
    Join Date
    Jul 2015
    Posts
    33

    Default

    +1 This would be really really handy.

  10. #10

    Default

    This is a must have feature for quick development. +1

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •