mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
enable web interface by default
This commit is contained in:
parent
2f541130ab
commit
c71e8dc829
2 changed files with 3 additions and 13 deletions
|
@ -9,14 +9,6 @@
|
|||
# path to a directory with all packages
|
||||
storage: ./storage
|
||||
|
||||
web:
|
||||
# web interface is disabled by default in 0.x, will be enabled soon in 1.x
|
||||
# when all its issues will be fixed
|
||||
#
|
||||
# set this to `true` if you want to experiment with web ui now;
|
||||
# this has a lot of issues, e.g. no auth yet, so use at your own risk
|
||||
#enable: true
|
||||
|
||||
auth:
|
||||
htpasswd:
|
||||
file: ./htpasswd
|
||||
|
|
|
@ -87,12 +87,10 @@ module.exports = function(config_hash) {
|
|||
|
||||
app.use(require('./index-api')(config, auth, storage))
|
||||
|
||||
if (config.web && config.web.enable) {
|
||||
app.use(require('./index-web')(config, auth, storage))
|
||||
if (config.web && config.web.enable === false) {
|
||||
next( Error[404]('web interface is disabled in the config file') )
|
||||
} else {
|
||||
app.get('/', function(req, res) {
|
||||
next( Error[404]('web interface is disabled in the config file') )
|
||||
})
|
||||
app.use(require('./index-web')(config, auth, storage))
|
||||
}
|
||||
|
||||
app.get('/*', function(req, res, next) {
|
||||
|
|
Loading…
Reference in a new issue