Skip to content

Commit

Permalink
Fix #31 default route for root path
Browse files Browse the repository at this point in the history
  • Loading branch information
nim579 committed Apr 3, 2020
1 parent 8122230 commit 6cb7bc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cli.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ program
{port, host, logs, root, index, https, key, cert, cors, notFound, timeout} = program
root = path.resolve _.head(program.args) if _.head(program.args)

srv = new Server {port, host, logs, root, index, https, key, cert, cors, notFound, timeout}, null, ->
console.log 'Server was shutdown at ' + new Date().toJSON()
srv = new Server {port, host, logs, root, index, https, key, cert, cors, notFound, timeout}, null, null, ->
console.log '\nServer was shutdown at ' + new Date().toJSON()

process.on 'SIGINT', -> srv.stop -> process.exit()
process.on 'SIGTERM', -> srv.stop -> process.exit()
Expand Down
2 changes: 1 addition & 1 deletion src/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Server
Object.defineProperty @, '_routes',
get: ->
return _.concat routes,
pattern: '**/*'
pattern: '**'
handler: 'file'

set: (newRoutes)->
Expand Down

0 comments on commit 6cb7bc5

Please sign in to comment.