Skip to content

Instantly share code, notes, and snippets.

@michaelsbradleyjr
Created July 20, 2011 06:25
Show Gist options
  • Save michaelsbradleyjr/1094450 to your computer and use it in GitHub Desktop.
Save michaelsbradleyjr/1094450 to your computer and use it in GitHub Desktop.
var connect = require('connect')
var server = connect.createServer()
server.use(connect.logger())
.use(connect.favicon())
.use('/jsan', connect.static(__dirname + '/../node_modules/.jsan'))
.use('/', connect.directory(__dirname + '/..'), { icons : true })
.use('/', connect.static(__dirname + '/..'))
server.listen(45678)
/* ----------------- */
if (process.getuid() === 0) {
var which_group = 'nogroup'
if (process.platform === 'darwin') {
which_group = 'nobody'
}
process.setgid(which_group)
process.setuid('nobody')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment