Skip to content

Commit

Permalink
Merge 796cb3a into 1337a31
Browse files Browse the repository at this point in the history
  • Loading branch information
harttle committed Oct 16, 2018
2 parents 1337a31 + 796cb3a commit d29bd49
Show file tree
Hide file tree
Showing 18 changed files with 2,309 additions and 3,168 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.json
Expand Up @@ -5,11 +5,15 @@
},
"extends": "standard",
"rules": {
"indent": ["error", 4],
"global-require": "off",
"space-before-function-paren": "off",
"eol-last": "off",
"handle-callback-err": "off",
"no-unused-vars": [
"error", {
"varsIgnorePattern": "logger"
}
]
}
}
}
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -3,5 +3,8 @@ node_js:
- "4"
before_script:
- npm install -g mocha
script:
- npm run lint
- npm run test
after_script:
- NODE_ENV=test ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
14 changes: 7 additions & 7 deletions bin/http.js
Expand Up @@ -14,10 +14,10 @@ program
.option('-c, --conf [path]', 'validator configuration file [rules.json]')

program.on('--help', function () {
console.log(' Examples:')
console.log('')
console.log(' $ node bin/http.js -H 0.0.0.0 -p 8888')
console.log('')
console.log(' Examples:')
console.log('')
console.log(' $ node bin/http.js -H 0.0.0.0 -p 8888')
console.log('')
})

program.parse(process.argv)
Expand All @@ -26,13 +26,13 @@ program.parse(process.argv)
// Initialize Validator
var config = null
if (program['conf']) {
var configPath = path.resolve(process.cwd(), program['conf'])
config = require(configPath)
var configPath = path.resolve(process.cwd(), program['conf'])
config = require(configPath)
}

var server = mkServer(config)
server.listen(program['port'], program['host'], function () {
console.log(`[http] listening to ${program['host']}:${program['port']}`)
console.log(`[http] listening to ${program['host']}:${program['port']}`)
})

module.exports = server

0 comments on commit d29bd49

Please sign in to comment.