node-http-server – Diff between revs 11 and 12
?pathlinks?
Rev 11 | Rev 12 | |||
---|---|---|---|---|
Line 24... | Line 24... | |||
24 | const certs = require( |
24 | const certs = require( |
|
25 | path |
25 | path |
|
26 | .resolve(__dirname, 'src', 'certs') |
26 | .resolve(__dirname, 'src', 'certs') |
|
27 | ); |
27 | ); |
|
Line 28... | Line 28... | |||
28 | |
28 | |
|
29 | // Configuration file. |
29 | // Load configuration file. |
|
30 | const config = require( |
30 | const config = require( |
|
31 | path |
31 | path |
|
32 | .resolve(__dirname, 'config') |
32 | .resolve(__dirname, 'config') |
|
Line 95... | Line 95... | |||
95 | log.error(error); |
95 | log.error(error); |
|
96 | break; |
96 | break; |
|
97 | } |
97 | } |
|
98 | }) |
98 | }) |
|
99 | ).listen(config.net.port, config.net.address, () => { |
99 | ).listen(config.net.port, config.net.address, () => { |
|
100 | log.info('HTTP Server is listening on: ' + |
100 | log.info('HTTP Server accessible at: http://' + |
|
101 | config.net.address + |
101 | config.net.address + |
|
102 | ' and port: ' + |
102 | ':' + |
|
103 | config.net.port + |
103 | config.net.port + |
|
104 | ' whilst serving files from: ' + |
104 | '.' + |
|
105 | root |
105 | root |
|
106 | ); |
106 | ); |
|
107 | }); |
107 | }); |
|
Line 108... | Line 108... | |||
108 | |
108 | |
|
Line 133... | Line 133... | |||
133 | log.error(error); |
133 | log.error(error); |
|
134 | break; |
134 | break; |
|
135 | } |
135 | } |
|
136 | }) |
136 | }) |
|
137 | ).listen(config.ssl.port, config.ssl.address, () => { |
137 | ).listen(config.ssl.port, config.ssl.address, () => { |
|
138 | // Print information on server startup. |
- | ||
139 | log.info('HTTPs Server is listening on: ' + |
138 | log.info('HTTPs Server accessible at: https://' + |
|
140 | config.net.address + |
139 | config.ssl.address + |
|
141 | ' and port: ' + |
140 | ':' + |
|
142 | config.net.port + |
141 | config.ssl.port + |
|
143 | ' whilst serving files from: ' + |
142 | '.' + |
|
144 | root |
143 | root |
|
145 | ); |
144 | ); |
|
146 | }) |
145 | }) |
|
147 | } |
146 | } |
|
148 | ); |
147 | ); |