Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9261083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:03:59+00:00 2026-06-18T13:03:59+00:00

I am working on a small node project and I use coffeescript and less

  • 0

I am working on a small node project and I use coffeescript and less for client-side code. I am trying to set up my development environment using grunt. I’ve implemented custom grunt task for running server like this:

start = require './start' #just a function to start express.js application
grunt.registerTask 'server', 'Starting server', ->
    grunt.log.write 'Preparing server to start'
    done = do @async
    start (err) ->
        grunt.log.write "server running at localhost:4000"

I also want to run the “watch” task using grunt-contrib-watch plugin:

grunt.initConfig
    watch:
        coffee:
            files: ['public/coffee/**/*.coffee']
            tasks: ['coffee']
        jade:
            files: ['public/jade/**/*.jade']
            tasks: ['jade']
        less:
            files: ['public/less/**/*.less']
            tasks: ['less']

The question is: How to make this two tasks (watch and server) run simultaneously? I want to have a server up and running and don’t want to reload it every time some client-side code is changed. Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T13:04:00+00:00Added an answer on June 18, 2026 at 1:04 pm

    Prefix it to your watch tasks, and get rid of the done = do @async inside the server task.

    tasks: ['server', 'coffee']

    You want to specify an option in your Grunt configuration for the server task to be “long-running” or not. Then you can call @async only if you need it to be long running (without the watch task).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working a small project, using AES encryption and wanted to use it in
We are using Node for developing and 95% of code is Async, working fine.
I'm working on small documents compiler. I'm using .NET expression trees to create code
I'm considering using Mustache.js for a small project I'm working on.... The one thing
is there any small working program for recieving from and sending data to client
I am working on small python payroll project where you enter employee name, wage,
Working on a small game using an HTML5 canvas, and javascript. And it's working
I'm working on a small uni project where I have a program for a
I have been working on a small file manager module in a project where
I am using the following code for parsing of small xml files and it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.