Skip to content

Run coffee #17

Description

@pronebird

Hi,

I have a bootstrap coffee script that I run with gulp-develop-server:

#!/usr/bin/env coffee

app = require '../src/app'
http = require 'http'

port = process.env.PORT or '3000'
app.set 'port', port

server = http.createServer app
server.listen port

I have tried to pass my script with path option to gulp-develop-server but it would run my script with node instead. Then I looked at the source code and figured that there is an execPath parameter which seem to do the trick.

gulp.task 'server:start', ->
  server.listen
    path: ''
    execPath: 'bin/www'
    env: require './config.json'
  return

gulp.task 'server:restart', ->
  server.restart()
  return

My question is, is it normal that I pass an empty path and provide custom execPath for my coffee script?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions