File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ fs.readdirSync(__dirname).forEach(file => {
27
27
28
28
app . use ( express . static ( __dirname ) )
29
29
30
+ const host = process . env . HOST || 'localhost'
30
31
const port = process . env . PORT || 8080
31
- module . exports = app . listen ( port , ( ) => {
32
- console . log ( `Server listening on http://localhost :${ port } , Ctrl+C to stop` )
32
+ module . exports = app . listen ( port , host , ( ) => {
33
+ console . log ( `Server listening on http://${ host } :${ port } , Ctrl+C to stop` )
33
34
} )
Original file line number Diff line number Diff line change 80
80
"lint-staged" : " ^8.2.0" ,
81
81
"nightwatch" : " ^1.1.13" ,
82
82
"nightwatch-helpers" : " ^1.0.0" ,
83
- "path-to-regexp" : " ^1.7 .0" ,
83
+ "path-to-regexp" : " ^1.8 .0" ,
84
84
"rollup" : " ^1.20.1" ,
85
85
"rollup-plugin-buble" : " ^0.19.8" ,
86
86
"rollup-plugin-commonjs" : " ^10.0.2" ,
Original file line number Diff line number Diff line change @@ -79,13 +79,13 @@ describe('Location utils', () => {
79
79
} )
80
80
81
81
it ( 'relative params (non-named)' , ( ) => {
82
- const loc = normalizeLocation ( { params : { lang : 'fr ' } } , {
82
+ const loc = normalizeLocation ( { params : { lang : 'FR ' } } , {
83
83
path : '/en/foo' ,
84
84
params : { lang : 'en' , id : 'foo' } ,
85
- matched : [ { path : '/:lang/:id' } ]
85
+ matched : [ { path : '/:lang(en|fr) /:id' } ]
86
86
} )
87
87
expect ( loc . _normalized ) . toBe ( true )
88
- expect ( loc . path ) . toBe ( '/fr /foo' )
88
+ expect ( loc . path ) . toBe ( '/FR /foo' )
89
89
} )
90
90
91
91
it ( 'relative append' , ( ) => {
Original file line number Diff line number Diff line change @@ -7774,13 +7774,20 @@ path-to-regexp@0.1.7:
7774
7774
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
7775
7775
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
7776
7776
7777
- path-to-regexp@^1.0.3, path-to-regexp@^1.7.0 :
7777
+ path-to-regexp@^1.0.3 :
7778
7778
version "1.7.0"
7779
7779
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d"
7780
7780
integrity sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=
7781
7781
dependencies :
7782
7782
isarray "0.0.1"
7783
7783
7784
+ path-to-regexp@^1.8.0 :
7785
+ version "1.8.0"
7786
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a"
7787
+ integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==
7788
+ dependencies :
7789
+ isarray "0.0.1"
7790
+
7784
7791
path-type@^1.0.0 :
7785
7792
version "1.1.0"
7786
7793
resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
You can’t perform that action at this time.
0 commit comments