Giter Club home page Giter Club logo

node-dev's Introduction

Build Status

node-dev (1)

Node-dev is a development tool for Node.js that automatically restarts the node process when a file is modified.

In contrast to tools like supervisor or nodemon it doesn't scan the filesystem for files to be watched. Instead it hooks into Node's require() function to watch only the files that have been actually required.

This means that you don't have to configure any include- or exclude rules. If you modify a JS file that is solely used on the client-side but never run on the server, node-dev will know this and won't restart the process.

This also means that you don't have to configure any file extensions. Just require a .json file or a .ts script for example and it will be watched. Automatically.

Usage

Just run node-dev as you would normally run node:

node-dev server.js

TypeScript support

You can use node-dev to watch and restart TypeScript projects. Install ts-node as dev-dependency, then use node-dev to run your script:

node-dev src/server.ts

Command-line options

There are a couple of command-line options that can be used to control which files are watched and what happens when they change:

  • --clear - Clear the screen on restart
  • --debounce - Debounce change events by time in milliseconds (non-polling mode, default: 10)
  • --dedupe - Dedupe dynamically
  • --deps:
    • -1 - Watch the whole dependency tree
    • 0 - Watch only the project's own files and linked modules (via npm link)
    • 1 (Default) - Watch all first level dependencies
    • <number> - Number of levels to watch
  • --fork - Hook into child_process.fork
  • --graceful_ipc <msg> - Send 'msg' as an IPC message instead of SIGTERM for restart/shutdown
  • --ignore - A file whose changes should not cause a restart
  • --interval - Polling interval in milliseconds (default: 1000)
  • --notify=false - Disable desktop notifications
  • --poll - Force polling for file changes (Caution! CPU-heavy!)
  • --respawn - Keep watching for changes after the script has exited
  • --timestamp - The timestamp format to use for logging restarts
  • --vm - Load files using Node's VM

Passing arguments to node

All command-line arguments that are not node-dev options are passed on to the node process.

Please note: you may need to separate your script from other command line options with --, for example:

node-dev --some-node-args -- my-script.js

Installation

node-dev can be installed via npm. Installing it with the -g option will allow you to use it anywhere you would use node.

npm install -g node-dev

Desktop Notifications

Status and error messages can be displayed as desktop notification using node-notifier:

Screenshot

Screenshot

Requirements:

  • Mac OS X: >= 10.8
  • Linux: notify-osd or libnotify-bin installed (Ubuntu should have this by default)
  • Windows: >= 8, or task bar balloons for Windows < 8

Config file

Upon startup node-dev looks for a .node-dev.json file in the following directories:

  • the user's home directory
  • the current working directory
  • the same directory as the script to run

Settings found later in the list will overwrite previous options.

Configuration options

Usually node-dev doesn't require any configuration at all, but there are some options you can set to tweak its behaviour:

  • clear – Whether to clear the screen upon restarts. Default: false
  • dedupe – Whether modules should by dynamically deduped. Default: false
  • deps – How many levels of dependencies should be watched. Default: 1
  • fork – Whether to hook into child_process.fork (required for clustered programs). Default: true
  • graceful_ipc - Send the argument provided as an IPC message instead of SIGTERM during restart events. Default: "" (off)
  • ignore - A single file or an array of files to ignore. Default: []
  • notify – Whether to display desktop notifications. Default: true
  • poll - Force polling for file changes, this can be CPU-heavy. Default: false
  • respawn - Keep watching for changes after the script has exited. Default: false
  • timestamp – The timestamp format to use for logging restarts. Default: "HH:MM:ss"
  • vm – Whether to watch files loaded via Node's VM module. Default: true

ESModules

When using ESModule syntax and .mjs files, node-dev will automatically use a loader to know which files to watch.

Dedupe linked modules

Sometimes you need to make sure that multiple modules get exactly the same instance of a common (peer-) dependency. This can usually be achieved by running npm dedupe – however this doesn't work when you try to npm link a dependency (which is quite common during development). Therefore node-dev provides a --dedupe switch that will inject the dynamic-dedupe module into your app.

Transpilers

You can use node-dev to run transpiled languages like TypeScript. You can either use a .js file as entry point to your application that registers your transpiler as a require-extension manually, for example by calling CoffeeScript.register() or you can let node-dev do this for you.

There is a config option called extensions which maps file extensions to compiler module names. By default the map looks like this:

{
  "coffee": "coffee-script/register",
  "ls": "LiveScript",
  "ts": "ts-node/register"
}

This means that if you run node-dev server.ts node-dev will do a require("ts-node/register") before running your script. You need to have ts-node installed as a dependency of your package.

Options can be passed to a transpiler by providing an object containing name and options attributes:

{
  "js": {
    "name": "babel-core/register",
    "options": {
      "only": ["lib/**", "node_modules/es2015-only-module/**"]
    }
  }
}

Graceful restarts

Node-dev sends a SIGTERM signal to the child-process if a restart is required. If your app is not listening for these signals process.exit(0) will be called immediately. If a listener is registered, node-dev assumes that your app will exit on its own once it is ready.

Windows does not handle POSIX signals, as such signals such as SIGTERM cause the process manager to unconditionally terminate the application with no chance of cleanup. In this case, the option graceful_ipc may be used. If this option is defined, the argument provided to the option will be sent as an IPC message via child.send("<graceful_ipc argument>"). The child process can listen and handle this event with:

process.on('message', function (msg) {
  if (msg === '<graceful_ipc argument>') {
    // Gracefully shut down here
    doGracefulShutdown();
  }
});

Ignore paths

If you’d like to ignore certain paths or files from triggering a restart, list them in the .node-dev.json configuration under "ignore" like this:

{
  "ignore": ["client/scripts", "shared/module.js"]
}

This can be useful when you are running an isomorphic web app that shares modules between the server and the client.

License

MIT

node-dev's People

Contributors

amosyuen avatar andreypopp avatar aseemk avatar bjornstar avatar bronson avatar corpix avatar cyjake avatar divanvisagie avatar drynwynn avatar fgnass avatar gasi avatar greenkeeperio-bot avatar hasenj avatar ivalsaraj avatar jinze avatar jvain avatar kherock avatar lehni avatar lovell avatar matthewmueller avatar pomeo avatar pyetras avatar ricardobeat avatar scsper avatar tiye avatar tmont avatar wclr 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  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  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

node-dev's Issues

running node-dev on windows fails with "use fs.watch api instead"

When running a simple : node_modules\.bin\node-dev app.js on a node install (0.6.8)
I get this :
[ERROR] Error Error: use fs.watch api instead at Object.watchFile (fs.js:734:11)

After some digging around, I found that coffee-script hit the same problem as documented here : issue 1803

The solution is to use watchFile when it exists and fs.watch otherwise. This is node 0.6 only as a side note ...

Not working with nodejs v0.8

Nodejs v0.8
NPM v1.1.32
Mac OSX Snow Leopard

$ node-dev server.js

sys.js:1
throw new Error(
^
Error: The "sys" module is now called "util".
at sys.js:1:69
at NativeModule.compile (node.js:602:5)
at Function.NativeModule.require (node.js:570:18)
at Function.Module._load (module.js:297:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (/opt/local/lib/node_modules/node-dev/node-dev:10:11)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)

Log a timestamp when restarting

In wrapper.js function log, I tweaked the log format to have a basic timestamp.

console.log('[\x1B[' + csi + 'm' + level.toUpperCase() + '\x1B[0m] ' + msg + ' | ' + new Date())

I often want to sanity check that my latest code has really been loaded and I find myself killing the node-dev process "just in case" when I'm worried maybe it hasn't restarted recently enough. A timestamp would give me more confidence that everything is working as it should.

node-dev crashes on cluster.fork()

Output:

        $ node-dev myapp.coffee 
        Spawning 1 workers..
        Worker... 0

        myapp.coffee:1
        quire 'underscor
              ^^^^^^^^^^^^

        node.js:201
                throw e; // process.nextTick error, or 'error' event on first tick
                      ^
        SyntaxError: Unexpected string
            at Module._compile (module.js:432:25)
            at Object..js (module.js:462:10)
            at Module.load (module.js:351:31)
            at Function._load (module.js:310:12)
            at Array.0 (module.js:482:10)
            at EventEmitter._tickCallback (node.js:192:40)
        worker 12960 died

Growl not working

I am assuming growl support should be out-of-the-box?

I'm not having any luck with that. I am using 1.4

npm install node-dev -g

Suggest changing instructions in README.md to:

npm install node-dev -g
... rather than:
npm install node-dev

Took me a while of reading the npm docs to figure this one out.

Ctrl-C is not works if got errors

generally when I listen on a port already bind, I can't stop the program and relaunch it like PORT=4000 node-dev app.js, I have to kill the node-dev instance

[ERROR] Error
Error: listen EADDRINUSE
at errnoException (net.js:670:11)
at Array.0 (net.js:771:26)
at EventEmitter._tickCallback (node.js:190:38)

can't press Ctrl-C to interrupt it here

.

.

Two instances open

Hey, I love node-dev; makes developing so much easier!

I tried to have two instances of node-dev open at the same time, but that won't work. Any suggestions?

Cheers
Mark

Calipso + node-dev

I just tried running this:

: calipso $ node-dev app
18 Jun 10:20:14 - [INFO] Started

and it only returned the [INFO] Started line then quit out of my prompt. I can run it fine using node app. Any clues?

Error when starting node-dev 0.2.7 and 0.2.8

This error happnes right when i start a node app that uses the express framework. Other node apps are ok and 0.2.6 works fine however. It also leaves the process running in the background after the crash so i have to kill it manually.

/usr/lib/node_modules/node-dev/node-dev:58
process.send(m)
^
TypeError: Object # has no method 'send'
at ChildProcess. (/usr/lib/node_modules/node-dev/node-dev:58:13)
at ChildProcess.EventEmitter.emit (events.js:99:17)
at handleMessage (child_process.js:273:12)
at Pipe.channel.onread (child_process.js:293:9)

extensions in .node-dev.json

I want to restart when a json file is changed.

here is the content of my .node-dev.json. Am I missing something?

{
"extensions": {
"coffee": "coffee-script",
"json": "json"
}
}

notify-send not working for me in ubuntu 11.04

Not quite sure of the cause of the issue. I can get notify-send to post a message if I manually run it from a terminal window, so the infrastructure is propertly set up. However whenever node-dev needs to send a notification, I see the notification output in the stdout of the terminal window but I don't see a notify-send message.

Repro Steps:

Install ubuntu 11.04
Install node.s v 0.5.0-pre, npm, and node-dev.
Install libnotify-dev (not sure if this step was necessary, many libnotify components were already installed)
Start a node program using command:
sudo node-dev WebServer.js

Results:

See log message in console like "[INFO] Started"

Expected:

See libnotify popup notification too, did not.

Environment check:
sudo notify-send "title" body"
results in a notification popup appearing as expected.

push latest to npm

Hey, I see you fixed the cluster issue a month ago, but it looks like that isn't reflected in the NPM module when I install it. Can you push the latest to npm?

Not watching .coffee files when main file is .js

It felt as if node-dev doesn't recognize .coffee files

$ cat server.js 
require("coffee-script")
require("./app.coffee")

$ cat app.coffee 
x = require "express"
app = x.createServer()
app.listen(9090)

app.get '/', (req, res) ->
    res.send("Sever Running!")

Now run node-dev server.js then edit app.coffee. Server won't restart.

Expected behavior: server should restart when app.coffee is modified.

Note: this setup works with node-supervisor

Running node-dev without specifying file

So, nodemon has this feature so that you can just, provided that you have a proper package.json, type nodemon and it looks at the package.json file and runs the file specified by "main".

I would enjoy this feature in node-dev also. Mostly because of the convenience.

Memory leaks during restart

After leaving node-dev opened overnight i'm getting quite significant memory leaks (600MB). Having this on windows. You can see it even during each restart.

If you won't be able to reproduce, i'll try to provide more info. Tx

it runs my script twice

I am trying to use nodev in ubuntu and I get this weird problem when running my script:

jose@ubuntu:~/projects/myapp$ nodev server.js 
   info  - socket.io started
27 Oct 11:27:10 - [nodev] v0.7.2
27 Oct 11:27:10 - [nodev] watching: /home/jose/projects/myapp
27 Oct 11:27:10 - [nodev] starting `node --debug server.js `
27 Oct 11:27:10 - [nodev] starting `node --debug server.js 
debugger listening on port 5858
debugger listening on port 5858
server is in http://localhost:8000

events.js:68
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: listen EADDRINUSE
    at errnoException (net.js:769:11)
    at Server._listen2 (net.js:909:14)
    at listen (net.js:936:10)
    at Server.listen (net.js:985:5)
    at Object.<anonymous> (/home/jose/projects/myapp/server.js:6:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
Failed to open socket on port 5858, waiting 1000 ms before retrying
27 Oct 11:27:10 - [nodev] app crashed - waiting for file changes before starting...
27 Oct 11:27:10 - [nodev node-inspector] info: socket.io started
27 Oct 11:27:10 - [nodev node-inspector] visit http://0.0.0.0:5801/debug?port=5858 to start debugging

as you can see, it seems that nodev try to start my script twice....

thanks

Coffescript

Any plans to support coffeescript? I created a .js main file so I could use it, but I think it doesn't watch changes on .coffee files anyway...

Constant restarts - mtime not correct

I'm experiencing that node-dev is restarting constantly - like every second. I tried to debug it a bit, and found that the error is due to the function watchFile(file, onChange)

When using fs.watchFile, the returned objects are "curr" and "prev". However, curr.mtime is not set:

The curr object:

{ dev: 147980288,
  ino: 0,
  mode: 1000,
  nlink: 1000,
  uid: 0,
  gid: 0,
  rdev: 1735262208,
  size: 5781756674612134000,
  blksize: 301959934,
  blocks: 1346170128,
  atime: Tue, 28 Aug 2012 16:08:48 GMT,
  mtime: Thu, 01 Jan 1970 00:00:00 GMT,
  ctime: Thu, 01 Jan 1970 00:02:16 GMT 
}

The prev object:

{ 
dev: 2049,
  ino: 2049,
  mode: 33188,
  nlink: 2,
  uid: 1000,
  gid: 1000,
  rdev: 0,
  size: 17592186046863,
  blksize: 8,
  blocks: 1346170102,
  atime: Tue, 28 Aug 2012 16:08:22 GMT,
  mtime: Tue, 28 Aug 2012 16:08:48 GMT,
  ctime: Thu, 01 Jan 1970 00:00:00 GMT 
}

I'm aware this is not a direct bug in node-dev, but maybe you are aware of the problem?

I'm running Ubuntu as guest on a Macbook Pro. The files are located in OSX in a shared folder.

As a quick fixed i've changed the script from checking on mtime to atime.

node-dev as a module in other apps

Hi guys,

First, thanks for node-dev. I find it really easy to use and convenient.

It would be great if I could use node-dev from my own project, which is a kind of "control panel" for all the apps running on a given host (akin to classic vhosting). What would you say about moving the spawn()/wrapper.js stuff into its own library, or at least making node-dev callable in some easy way from other Node apps?

Wrapper script not robust to require handler changes

Hey there,

Great work on the library, first of all! I love the intent and design behind it.

We just tried using it, though, and unfortunately we ran into one snag: we rely on another library which replaces the ".js" require() extension handler, so node-dev's require watcher doesn't get invoked on any requires from that point on.

Here is the relevant code from that library:

https://github.com/Sage/streamlinejs/blob/master/lib/compiler/register.js

You can see it replaces require.extensions[".js"], so node-dev, which set it before, no longer gets notified of .js requires. (It also does this to Coffee.)

Unfortunately, it's not straightforward to fix this from the library's side. Because of the way require.extensions works, this library can't be expected to call the previous handler after it does its thing, because the other handler could then double-call module._compile().

Do you know of another way node-dev could watch required files? Is it out of the question to actually wrap global.require instead of registering extension handlers? (That would also allow it to handle other extensions beyond .js and .coffee too!)

Thanks for your consideration, and great work again!

Open to supporting Streamline too?

I've been using node-dev for over a year and loving it. I've also been using Streamline for the same amount of time and loving that too.

(Streamline's a tool to transform sync-looking JS into async JS. Super effective; unlike libraries, it works at a language level, e.g. letting you use try-catch, loops, switch, etc.)

Just wondering, would you be open to adding support for Streamline for running files directly just like there is for CoffeeScript? It's trivial technically (the same ~2 lines extra as for CoffeeScript), and I'm happy to submit a pull request for it, but just wanted to ask you first. =)

My current workflow is this:

node-dev app-dev app

Where app-dev is this ~4-line wrapper file that require()s CoffeeScript and Streamline in order to register their extensions and then "runs" the main app file as the "main" file just like node-dev does.

Not bad, but a little annoying to have this app-dev file in every project. Making it an npm module isn't helpful, because the file argument to node-dev/node isn't resolved through node_modules.

(I could go the other way and make a wrapper around node-dev, but that'd duplicate a lot of great code node-dev already has for keeping the environment, making sure spawned subprocesses are wrapped too, etc.)

Thanks for the consideration!

Add a config file

There are several open request (#47, #49, #50, #52) involving config options. This issue is used to collect ideas and discuss the naming and behavior of the file itself as well as the various options. Here is the initial proposal taken straight from #47:

{
  "notify": false,
  "clearScreen": true,
  "timestamp": true,
  "vm": false,
  "ignore": [
    "public/*.js"
  ],
  "extensions": {
    "ls": "LiveScript",
    "ts": "typescript",
    "coffee": "coffee-script"
  }
}

no license

Our company cannot use any software without a license.

On Mac, Nodejs 0.6.21: TypeError: undefined is not a function

/usr/local/lib/node_modules/node-dev/node_modules/growl/lib/growl.js:19
if (exists(loc)) return loc;
^
TypeError: undefined is not a function
at which (/usr/local/lib/node_modules/node-dev/node_modules/growl/lib/growl.js:19:9)
at Object. (/usr/local/lib/node_modules/node-dev/node_modules/growl/lib/growl.js:25:9)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object. (/usr/local/lib/node_modules/node-dev/wrapper.js:10:13)
at Module._compile (module.js:446:26)

correction for regexp to find src file in stack trace

diff --git a/node-dev b/node-dev
index 55889ae..768244d 100755
--- a/node-dev
+++ b/node-dev
@@ -100,7 +100,7 @@ function start(title, msg) {
       // source-code
       //       ^^^^^
       // ErrorType: Message
-      src = error.match(/^\s*(.+):(\d+)\n(.*)\n(\s*)\^/);
+      src = error.match(/^\s*(.+):(\d+)\n(.*)\n(\s*)\^/m);

       if (src && !src[3].match(/throw/)) {
         file = src[1];

Need the 'm' option to have '^' work as intended.

Before this change, node-dev would not correctly find the src line in output like this (in this case it was a SyntaxError):

...
/Users/trentm/myawesomeproject/main.js:192
var var
    ^^^

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
...

This package is awesome, by the way. Thanks!

Sometimes doesn't resume from error

Hey there,

This is occasional, but it's happened often enough that it's worth asking about: sometimes, if there's an error on startup (e.g. we use CoffeeScript and compile it on start-up, so if we have a CoffeeScript parse error), node-dev sometimes never resumes, no matter how often I re-save the file.

Any ideas what might be causing this? It's likely a timing error, so perhaps there's a race condition somewhere? The relevant code is probably lines 73-86, but I can't see any obvious bug.

Thanks in advance for your help!

Cannot reload on static file changes

I have my stylesheets and coffeescripts files stored in the /assets/ folder. As it isn't included in any form of require(), it is not watched by node-dev.

Where could explicitly add them under watch list?

Newest node-dev doesn't seem to respect catch from require() errors?

Quick FYI: we're still running Node 0.4.10, and when we upgraded to node-dev 0.2.1 right now -- since it no longer requires Node 0.6 -- we found that our website no longer works. If we downgrade back to node-dev 0.1.9, it works again.

We use the connect-redis middleware for Express, which in turn uses the redis module. We get this error on startup from within that module:

Error: Cannot find module 'hiredis'
    at Function._resolveFilename (module.js:317:11)
    at Function._load (module.js:262:25)
    at require (module.js:346:19)
    at Object.<anonymous> (/Users/aseemk/Projects/Thingdom/www/node_modules/connect-redis/node_modules/redis/lib/parser/hiredis.js:5:15)
    at Module._compile (module.js:402:26)
    at Object.<anonymous> (/Users/aseemk/Projects/Thingdom/www/coffee-streamline.coffee:84:19)
    at Object..js (/usr/local/lib/node_modules/node-dev/wrapper.js:85:16)
    at Module.load (module.js:334:31)
    at Function._load (module.js:293:12)
    at require (module.js:346:19)

When we open up that redis/lib/parser/hiredis.js file, it looks like this at the top:

var events = require("events"),
    util = require("../util").util,
    hiredis = require("hiredis");

exports.debug_mode = false;
exports.name = "hiredis";

I've never seen that pattern before, but I'm guessing it means that Node should consider this current file a module named "hiredis". No idea how it works when the require("hiredis") statement comes before the exports.name = "hiredis" one.

Update: I'm not sure why the exports.name = "hiredis" statement is there, but hiredis is indeed a module in npm. But it's not listed in the package.json as a required dependency, so it's not installed on our systems by default.

Here's also the code which requires that file, from redis/index.js:

// hiredis might not be installed
try {
    require("./lib/parser/hiredis");
    parsers.push(require("./lib/parser/hiredis"));
} catch (err) {
    if (exports.debug_mode) {
        console.warn("hiredis parser not installed.");
    }
}

It seems here that even if the above code fails, which it should, since we don't have the hiredis module installed, the error should be caught and suppressed.

So! It seems the real node-dev bug here is that the error isn't being suppressed when it should be?

Hope this info helps! We'll stick w/ node-dev 0.1.9 for now, but we'd love to be able to use 0.2.x whenever this is fixed. Lemme know if I can provide any more info!

/cc @jeremyis

EDIT: updated title to reflect what appears to be the cause of the bug?

Record child process pid to separate file

It would be helpful if we could output the child process pid to a separate file (like app.pid; should be configurable) to use in start scripts where we want to kill any previous instance of the process when starting.

The code to do this is pretty straight forward:

if (pidFile) fs.writeFileSync(pidFile, child.pid+'\n')

Configuring this option should probably use the config file mentioned in #53, or option parsing be added (instead of the for loop currently used).

node-dev doesn't set require.main correctly?

Maybe I'm using an outdated pattern, but this used to work

console.log("WOOT")

setInterval(function() {
console.log("OK")
}, 1000)

if (module == require.main)
console.log("IS MAIN")

Now, node-dev will run the file, but won't print out "IS MAIN"

Express JS server is re-spawned 6 times

With the latest updates to node-dev my ExpressJS server is not working due to being re-spawned 6-times in a row on file changes. Completely bringing it down with errors about address already in use because of the other instances running.

On another note, this project is missing a proper CHANGELOG.

ENOENT when using node-dev with REPL

test.js

repl = require('repl');
repl.start('> ');

Bash:

$ node-dev test
> console.log('hello')
hello
undefined
> [ERROR] Error
Error: ENOENT, stat 'repl'

undefined
> [ERROR] Error
Error: ENOENT, stat 'repl'
[ERROR] Error
Error: ENOENT, stat 'repl'

Anyone have an idea why?

Notifications on Ubuntu via notify-send

It is possible to trigger notifications on the Ubuntu desktop via notify-send.

For instace in node-dev:54

function notify(msg, title, level) {
  ...
  child_process.spawn('notify-send', [
    '--icon', __dirname + '/icons/node_' + level + '.png',
    msg  ]);
}

notify-send is installable from the Ubuntu repository.

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.