dozehost v4.0.0
Dozehost π
made by Fabboy
What is Dozehostβ
Dozehost is a simple, fast, and secure way to host your website. It's free and open source. Dozehost supports various features and will be updated as new features are added.
How to use Dozehost? βοΈ
- Install the NPM package
npm install dozehost
- Create a server file where you can host your website for example "server.js"
- Create a root folder where your website is located for example "root"
Current file structure:
(i also create a "index.html" file)
βββ root
β βββ index.html
βββ server.js
- Setup the Server script to run your website (This script can be various depending on your server setup)
//import the package
const dozehost = require("dozehost")
//create a server
const doze = new dozehost("./root", 3030, "index.html") //set the root folder, the port, and the default file
//redirect all requests on empty / to the default file
doze.redirect("/", "/index.html")
// start the host
doze.serve()
//print the url
console.log("http://localhost:" + doze.port)
- Open your browser and go to http://localhost:3030 to see your website π Now the file structure should look like this:
βββ root
β βββ serverAssets
β β βββ 404.html
β β βββ redirect.json
β βββ debug
β β βββ ips.json
β β βββ debug.log
β βββ index.html
βββ server.js
Features π§
- Fast
- Redirecting
- Easy
- Logging
- DDOS protection (works sometimes but not always)
- IP tracking (perfect if you're hosting your application publicly)
The script will create a redirect.json file with all redirects in it. You can add and remove redirects from the redirect.json file. The script will also create a 404.html file if it doesn't find a file. You can edit the 404.html file. The script will also create a debug.log file The script will also create a ips.json with all the ips that have visited the website and their userid.
DDOS protection π£
The DDOS protection works with Milliseconds and will try to block the ip for a certain amount of time.
Future Features π
- Add support for other file types
- Dashboard for admins
- Support for multiple servers
- external redirects
License π
Dozehost is licensed under the MIT license. You can view the full license text here.