My custom webserver module
npm install @lexho111/webserver.js
npm install @lexh111/webserver.js
`
`
import app from "@lexho111/webserver.js";
app.start();
`
$3
- select a style from the settings menu in the browser
$3
- Username: _testuser_
- Password: _test_
$3
You can specify a port and your own config and styles file.
- webserver configuration: _config.json_
- website content: _content.json_
`
import app from "@lexho111/webserver.js";
const configPath = "./config.json";
const stylesheetPath = "./styles.css";
const options = {
port: 8080,
configPath: configPath,
style: stylesheetPath
};
app.start(options);
`
config.json
`
{
"websitetitle": "My Awesome New Website",
"build": "release",
"enableModules": true
}
`
you can set properties via options
`
import app from "@lexho111/webserver.js";
const options = {
port: 8080,
websitetitle: "My Awesome New Website",
contentPath: "my-website-content.json",
style: "div { color: darkgray; }",
stylePath: "customstyles.css",
};
app.start(options);
`
or like this
`
import app from "@lexho111/webserver.js";
const options = { port: 8080 };
app.setWebsiteTitle("My Awesome New Website 3");
app.setLanguage("en");
app.setStyle("div { color: darkgray; }");
app.setStylePath("customstyles.css");
app.start(options);
``