Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including dserv with all npm packages installed. Try it out:

dserv lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("dserv/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

dserv v0.0.0

Node.js mini http server for frontend dev

dserv

Node.js mini http server for frontend development. Compiles Jade templates and Stylus CSS on the fly. Serves static files (e.g. images, video) as-is.

It's a quick & dirty hack... could use several improvements :)

INSTALLATION

npm install dserv -g

USAGE

dserv [PORT]
  • Serves files under the current directory, on port 8000 by default.
  • Request foo.html -> render foo.jade
  • Request bar.css -> compile bar.styl as needed

TODO

  • LESS
  • SASS/SCSS
  • CoffeeScript
  • ...
  • subdir indexes (eg. request foo/ -> render foo/index.jade)
  • if no index.* file, list files w/ connect.directory
  • connect.favicon
  • trim dependencies? is Express overkill? Connect??
  • Windows support?

Similar tools

quickserve - static only tserv - static only paperserve - static only?

LICENSE

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free