This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global require */ | |
// Illustration-only for a mailing list discussion - not a recommended pattern | |
// for production because of root usage. Untested. | |
// http://groups.google.com/group/nodejs/browse_thread/thread/b41ad5d727d8dff8 | |
// usage example: | |
// node thisfile.js local server:create | |
// node thisfile.js local server:stop <IP> | |
// node thisfile.js local server:start <IP> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var types = { | |
'.3gp' : 'video/3gpp', | |
'.a' : 'application/octet-stream', | |
'.ai' : 'application/postscript', | |
'.aif' : 'audio/x-aiff', | |
'.aiff' : 'audio/x-aiff', | |
'.asc' : 'application/pgp-signature', | |
'.asf' : 'video/x-ms-asf', | |
'.asm' : 'text/x-asm', | |
'.asx' : 'video/x-ms-asf', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2009 Ryan Dahl <[email protected]> | |
#include <v8.h> | |
#include <node.h> | |
#include <node_os.h> | |
#include <sys/types.h> | |
#include <sys/time.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <assert.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2009 Ryan Dahl <[email protected]> | |
#ifndef SRC_OS_H_ | |
#define SRC_OS_H_ | |
#include <node.h> | |
#include <v8.h> | |
#include <sys/types.h> | |
#include <pwd.h> /* getpwuid() */ | |
#include <grp.h> /* getgrgid() */ |
NewerOlder