Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bin/lib/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const options = require('./options')
const fs = require('fs')
const extend = require('extend')
const colors = require('colors/safe')
const { cyan, red, bold } = require('colorette')

module.exports = function (program, server) {
const start = program
Expand All @@ -29,7 +29,7 @@ module.exports = function (program, server) {
fs.readFile(configFile, (err, file) => {
// No file exists, not a problem
if (err) {
console.log(colors.cyan.bold('TIP'), 'create a config.json: `$ solid init`')
console.log(cyan(bold('TIP')), 'create a config.json: `$ solid init`')
} else {
// Use flags with priority over config file
const config = JSON.parse(file)
Expand Down Expand Up @@ -123,17 +123,17 @@ function bin (argv, server) {
} catch (e) {
if (e.code === 'EACCES') {
if (e.syscall === 'mkdir') {
console.log(colors.red.bold('ERROR'), `You need permissions to create '${e.path}' folder`)
console.log(red(bold('ERROR')), `You need permissions to create '${e.path}' folder`)
} else {
console.log(colors.red.bold('ERROR'), 'You need root privileges to start on this port')
console.log(red(bold('ERROR')), 'You need root privileges to start on this port')
}
return 1
}
if (e.code === 'EADDRINUSE') {
console.log(colors.red.bold('ERROR'), 'The port ' + argv.port + ' is already in use')
console.log(red(bold('ERROR')), 'The port ' + argv.port + ' is already in use')
return 1
}
console.log(colors.red.bold('ERROR'), e.message)
console.log(red(bold('ERROR')), e.message)
return 1
}
app.listen(argv.port, function () {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"body-parser": "^1.18.3",
"busboy": "^0.2.12",
"camelize": "^1.0.0",
"colors": "^1.1.2",
"colorette": "^1.0.5",
"commander": "^2.9.0",
"cors": "^2.7.1",
"debug": "^2.6.9",
Expand Down