Coder Social home page Coder Social logo

connect-architect's Introduction

connect-architect's People

Contributors

cadorn avatar darobin avatar fjakobs avatar hillct avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

connect-architect's Issues

TypeError: Object # has no method 'modified'

Throws up this error ... . When i type http://localhost:8080/ I dont think the method Utils.modified exists in the connect 2.7.6 specified in the package.json.

/code/github.com/connect-architect/connect/middleware/static.js:184
if (!utils.modified(req, res)) {
^
TypeError: Object # has no method 'modified'
at /code/github.com/connect-architect/connect/middleware/static.js:184:18
at Object.oncomplete (fs.js:107:15)

Arbitrary port should be propagated to other plugins?

Given a listen port of value 0, the OS will select a random, available port automatically. In an architect system, the real port can be retrieved as follow:

    architect.createApp(
        architect.resolveConfig(
            plugins,
            path.join(dirname, 'plugins-server')),
        function (err, app) {
           if (err) {
               console.error("While starting the '%s' for '%s':", dirname, workdir);
               cb(err);
           } else {
               console.log("Started '%s' for '%s'!", dirname, workdir);
               var address = app.services.http.getServer().address();
               cb(null, address);
           }
        }
    );

However, due to the plugin nature of Architect, this system selected port is not propagated to other modules that depend on that port.

In Cloud9 for example we have these configuration directives that directly take the port:

            packagePath: "./cloud9.core",
            debug: false,
            fsUrl: fsUrl,
            smithIo: {
                port: port,
                prefix: "/smith.io/server"
            },

or:

        }, {
            packagePath: "vfs-architect/http-adapter",
            mount: vfsUrl,
            httpRoot: "http://localhost:" + port + vfsUrl
        }, {
            packagePath: "./cloud9.fs",
            urlPrefix: fsUrl
        },
        "./cloud9.socket",
        {
            packagePath: "connect-architect/connect.session",
            key: "cloud9.sid." + port,
            secret: "v1234"
        },

...although my Cloud9 instance "seems" to be working (without any error on the console) with this arbitrary port, I'm wondering about the impact of passing a port 0 to all these different plugins...

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.