Giter Club home page Giter Club logo

Comments (9)

joliss avatar joliss commented on August 21, 2024

I don't think this is really feasible, since Broccoli has a broccoli build command that has nothing to do with the server. server.js also seems like a strange place to have the build definition for your app.

For what it's worth, I'm not overly concerned with having a bunch of files in the top-level directories of my apps. The actual complexity matters much more than the number of files.

from broccoli.

MajorBreakfast avatar MajorBreakfast commented on August 21, 2024

The scenerio I'm describing would fit very nicely into the app I'm currently building. I'm not saying that the command line is obsolete.

The idea is to have broccoli compile the scripts and assets when the server boots up. This is especially awesome if you deploy your server code using git. No command line calls needed.

from broccoli.

joliss avatar joliss commented on August 21, 2024

In my opinion people should not expose Broccoli to the world via a server, because you are adding a lot of attack surface just to serve a few static files. I've added this to the README too. Whatever quick hacks you do for your own apps is up to you (and totally reasonable), but I don't want to make this officially sanctioned.

from broccoli.

stefanpenner avatar stefanpenner commented on August 21, 2024

ember apps are great to serve from CDN's

from broccoli.

MajorBreakfast avatar MajorBreakfast commented on August 21, 2024

@joliss Broccoli basically generates files and stores them in a directory. Express takes those files and serves them. I don't see any danger in that. (With rebuilding disabled in production mode)
@stefanpenner CDNs are more for high traffic websites. For small sites having everything in one place is more convenient. But that's one of the things I really like about ember. The serverside complexity goes to zero.

from broccoli.

rwjblue avatar rwjblue commented on August 21, 2024

@MajorBreakfast - Not to quibble, but it is quite usual to generate static sites (whether with CDN or plain S3).

from broccoli.

MajorBreakfast avatar MajorBreakfast commented on August 21, 2024

@rjackson 'Course :) But throwing a little site on heroku is still easier.

from broccoli.

stefanpenner avatar stefanpenner commented on August 21, 2024

We should pave the static deployment path.

from broccoli.

joliss avatar joliss commented on August 21, 2024

Express takes those files and serves them. I don't see any danger in that. (With rebuilding disabled in production mode)

Hm yes, this doesn't seem unreasonable to support at some point in the future. Maybe a year from now. For now let's keep the complexity low. [Edit 3/15/14: Ouch, did I really write this? No, running the broccoli middleware in production will never be good security practice.]

from broccoli.

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.