GithubHelp home page GithubHelp logo

scramjs / express-web-components Goto Github PK

View Code? Open in Web Editor NEW
82.0 82.0 3.0 83 KB

Declaratively build Express applications with web components.

License: MIT License

HTML 82.78% JavaScript 1.12% TypeScript 16.10%

express-web-components's People

Contributors

lastmjs avatar

Stargazers

 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  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  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

express-web-components's Issues

Don't mutate child nodes

Instead of mutating the child nodes and using a property observer to call init, why don't you call a method on the child nodes? You can then pass in all of the properties of the express bundle as parameters. This will be more functional, less mutations.

User Story - Set port in HTML

Story: Developer can set the port directly in the HTML to any available port.

Acceptance tests:

  • Set the port to multiple values, and each time check that you can make a request

Switch to NPM

This repository was originally published on NPM, but I'm realizing that it is too difficult to try to work with Polymer in NPM until Polymer officially makes the switch. You can follow the issues below, and once Polymer officially supports NPM, we can make the switch:

Give access to the server

The use case I'm having trouble with is setting up socket.io. I do not have access to the server before it starts listening, and so I can't hook up socket.io correctly. What if we could pass in a function to be applied with the server before the serve starts listening in express-app?

Use class member method data-binding

Polymer 2 should allow class member methods to be data-bound to local element properties. This will be syntactically better than setting the handlers on the component class' context, like we are doing it now. Make the switch once Polymer 2 is stable.

User Story - Set port in JavaScript

Story: The developer can set the port in JavaScript through data binding.

Acceptance tests:

  • The port is set multiple times through data binding, and requests are made to ensure it works.

User Story - The hostname is set directly as a string value of an HTML attribute

Story: The hostname is set directly as a string value of an HTML attribute

Acceptance tests:

  • Set the hostname through the HTML attribute on express-app and ensure that the express app is listening at that hostname
  • Set the hostname through data binding and ensure that hte express app is listening at that hostname
  • Do the above test for multiple hostnames

No more ExpressParentBehavior

Having a behavior is tying us to Polymer, and it is potentially more cumbersome to the user than necessary. Figure out how to get rid of it. I think we should be able to pass/set the init function to the child nodes from the parent node.

React to light DOM changes

If someone adds a child element at runtime, make sure the parent element responds appropriately. I'm not sure we can dynamically add middleware, because we might have to restart the server...But maybe

Inline the scripts again

I put the scripts for each component in the example in a separate file to prepare them for all es-next and TypeScript features, but I really like having the components inline. Once this issue is figured out, switch to inline scripts again.

Consider vanilla web components

These components are stand-alone and relatively simple. Think about writing them vanilla. We could then drop the extra complexity that is Polymer. It would be nice to not have to load Polymer at all, and with Electron we can just depend directly on the web component specs available to us. Applications built with these components can and I believe should be written in something like Polymer, but vanilla is sounding pretty good for these and other Scram.js universal web components.

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.