Skip to content

Commit

Permalink
feat: add default config
Browse files Browse the repository at this point in the history
  • Loading branch information
e-cloud committed Sep 20, 2016
1 parent 60337ed commit da86bb1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ const sps = require('./static-proxy-server')

module.exports = {
register,
run
run,
config: {
port: 8080,
host: 'localhost',
browse: true,
https: false,
apiProxy: null
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion static-proxy-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = function createServer(config) {
logger.info(`\nserving file from ${staticPath}\nstatic-proxy-server is running...`)

const serverUrl = url.format({
protocol: config.protocol,
protocol: config.https ? 'https' : 'http',
hostname: config.host,
port: config.port
})
Expand Down

0 comments on commit da86bb1

Please sign in to comment.