1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-11-01 01:30:21 +01:00

Update server config path

This commit is contained in:
John Crepezzi 2012-09-19 14:28:52 -04:00
parent e0610bc1be
commit 814a49812a
2 changed files with 38 additions and 45 deletions

View file

@ -1,52 +1,45 @@
{ {
"name": "haste", "name": "haste",
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"description": "Private Pastebin Server", "description": "Private Pastebin Server",
"keywords": [
"keywords": [ "paste", "pastebin" ], "paste",
"pastebin"
],
"author": { "author": {
"name": "John Crepezzi", "name": "John Crepezzi",
"email": "john.crepezzi@gmail.com", "email": "john.crepezzi@gmail.com",
"url": "http://seejohncode.com/" "url": "http://seejohncode.com/"
}, },
"main": "haste", "main": "haste",
"dependencies": { "dependencies": {
"winston": "*", "winston": "*",
"connect": "< 2", "connect": "< 2",
"uglify-js": "*" "uglify-js": "*"
}, },
"devDependencies": { "devDependencies": {
"mocha": "*", "mocha": "*",
"should": "*" "should": "*"
}, },
"bundledDependencies": [], "bundledDependencies": [],
"engines": { "engines": {
"node": "*" "node": "*"
}, },
"bin": { "bin": {
"haste-server": "./server.js" "haste-server": "./server.js"
}, },
"files": [
"files": [ "server.js", "lib", "static" ], "server.js",
"lib",
"static"
],
"directories": { "directories": {
"lib": "./lib" "lib": "./lib"
}, },
"scripts": { "scripts": {
"start": "node server.js", "start": "node server.js",
"test": "mocha -r should spec/*" "test": "mocha -r should spec/*"
} },
"subdomain": "hastebin"
} }

View file

@ -8,7 +8,7 @@ var connect = require('connect');
var DocumentHandler = require('./lib/document_handler'); var DocumentHandler = require('./lib/document_handler');
// Load the configuration and set some defaults // Load the configuration and set some defaults
var config = JSON.parse(fs.readFileSync('config.js', 'utf8')); var config = JSON.parse(fs.readFileSync('./config.js', 'utf8'));
config.port = config.port || 7777; config.port = config.port || 7777;
config.host = config.host || 'localhost'; config.host = config.host || 'localhost';