Skip to content

Commit bb65d47

Browse files
committed
chore(local-server): メッセージを日本語に変更
1 parent 0df8c8e commit bb65d47

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/local-server.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import serveStatic = require("serve-static");
55
import { HandleFunction } from "connect";
66
import detectPort = require("detect-port");
77
import { responseLog } from "./middlewares/response-log";
8-
8+
import chalk from "chalk";
99
const logSymbols = require("log-symbols");
1010

1111
export 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
});

0 commit comments

Comments
 (0)