Last active
October 12, 2021 14:36
-
-
Save chasyumen/b96573602863354cedb2df963bbff425 to your computer and use it in GitHub Desktop.
lite-web-server example code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const LWS = require("lite-web-server"); | |
const server = LWS.WebServer({ | |
port: 3000, | |
dir: "./public", //create /public directory (folder) and put files in that directory. | |
serveindex: false, //to keep your files safe, turn off this when you are not using this. | |
errordocument: { | |
//_404: "custom 404 html page path", | |
//_405: "custom 405 html page path", | |
} | |
}); | |
server.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment