0.0.3 • Published 4 years ago

monhu-http v0.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

MonHu HTTP

超簡単HTTPサーバー

サーバーの立て方

npm i monhu-httpをして、

server.jsに、

require("monhu-http");

を書くだけ。

サーバーのメインファイルはviews/index.htmlになっています。

設定等の変更方法

サーバーの設定は、 server.jsを、

const monhttp = require("monhu-http");

monhttp.config("サーバーを開くポート", "サーバーのindex.html等が入ったフォルダ", "エラー404のhtml(htmlのコードを入れる)", "エラー403のhtml(コード)", "エラー500のhtml(コード)");
//↑のもので、一部のみ変更も可能です。

に書き換えてください。

設定のデフォルトは、

const monhttp = require("monhu-http");
monhttp.config(3000, "views", "", "", "");

です。

楽しいサーバー運営者生活を。MonHuでした。