UNPKG

simple-server

Version:

Simple Server allows you to easily get a node.js static file server up and running anywhere anytime.

11 lines 210 B
var serve = require('serve') var path = require('path') module.exports = function (dir, port) { serve( path.resolve(process.cwd(), dir || '.'), { port: port || 3000, ignore: ['node_modules'] } ) }