13
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

shift-jis でもOKなnodeの簡易サーバー

http-server で SJISサイトがNG

http-server がよく簡易サーバーとして挙げられることが多いんですが、Node.jsは基本的にUTF-8推奨です。http-serverだと、完全に文字化けします。

node-staticをお使いください。

$ npm install node-static -g
$ static

http://0.0.0.0:8080 とか、http://localhost:8080 で文字化けしない。


本日は以上です。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
13
Help us understand the problem. What are the problem?