mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-02 14:24:19 +01:00
18 lines
419 B
JavaScript
18 lines
419 B
JavaScript
|
/*
|
||
|
* Simple connect server for phantom.js
|
||
|
* Adapted from Modernizr
|
||
|
*/
|
||
|
|
||
|
var connect = require('connect')
|
||
|
, args = process.argv.slice(2)
|
||
|
, fs = require('fs')
|
||
|
, folder = '/../../'
|
||
|
, port = '3000'
|
||
|
|
||
|
var server = connect.createServer(
|
||
|
connect.static(__dirname + folder)
|
||
|
).listen(port)
|
||
|
|
||
|
fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8')
|
||
|
|
||
|
console.log("Server started on port %s in %s", port, folder)
|