Code Monkey home page Code Monkey logo

Comments (3)

ericclemmons avatar ericclemmons commented on June 25, 2024

This isn't something you do in your app.js file? (Trying to understand...)

from grunt-express-server.

jacinto123 avatar jacinto123 commented on June 25, 2024

I can do it in my app.js file but since I only use this for dev i have to add an if statement check the node env which to me seems dirty.

from grunt-express-server.

ericclemmons avatar ericclemmons commented on June 25, 2024

Ah, that's the same way I do it, especially since I also add a logger in development mode.

I don't think that's a feature I'll be adding to this project. The express task operates on the http.createServer(...) that's returned, not the express.app(...) itself. In other words, it's quite a bit outside the scope.

grunt-express's project scope encompasses this, and differs from grunt-express-server in that this project was created for use with Genesis Skeleton to make it easy to just have livereload capabilities. Everything else actually adds a good amount of complexity, such as auto-adding files to watch, appending middleware to app, etc.

Blai's project is pretty great, so I'd recommend using that if grunt-based middleware is what you need!

from grunt-express-server.

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.