File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import serveStatic = require("serve-static");
55import { HandleFunction } from "connect" ;
66import detectPort = require( "detect-port" ) ;
77import { responseLog } from "./middlewares/response-log" ;
8-
8+ import chalk from "chalk" ;
99const logSymbols = require ( "log-symbols" ) ;
1010
1111export interface LocalServerOptions {
@@ -26,14 +26,23 @@ export class LocalServer {
2626 start ( ) {
2727 return detectPort ( this . port ) . then ( newPort => {
2828 if ( this . port !== newPort ) {
29- console . log ( `${ logSymbols . warning } Port:${ this . port } is already used. Lookup next available port.` ) ;
29+ console . log (
30+ `${ logSymbols . warning } ポート番号:${
31+ this . port
32+ } はすでに使われています。別の利用できるポート番号を探索中…`
33+ ) ;
3034 }
3135 const serve = serveStatic ( this . rootDir , { index : [ "index.html" , "index.htm" ] } ) as HandleFunction ;
3236 this . server = connect ( )
3337 . use ( responseLog ( ) )
3438 . use ( serve )
3539 . listen ( newPort , function ( ) {
36- console . log ( `${ logSymbols . info } Open http://localhost:${ newPort } ` ) ;
40+ console . log ( `
41+ 次のURLをブラウザで開いてください。
42+
43+ URL: ${ chalk . underline ( `http://localhost:${ newPort } ` ) }
44+
45+ ` ) ;
3746 } ) ;
3847 return this . server ;
3948 } ) ;
You can’t perform that action at this time.
0 commit comments