# dozehost

> made by Fabboy

Latest version **4.0.0** (published 2022-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install dozehost
pnpm add dozehost
yarn add dozehost
bun add dozehost
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2022-04-09 |
| First published | 2022-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 78.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fabboy |
| Maintainers | fabboy |
| Keywords | electron, host, doze, dozehost, hosting, hosting-service, server, package, container |

## Links

- npm: https://www.npmjs.com/package/dozehost
- Repository: https://github.com/Fabbboy/dozehost
- Homepage: https://github.com/Fabbboy/dozehost#readme
- Issues: https://github.com/Fabbboy/dozehost/issues
- npm.io page: https://npm.io/package/dozehost

## Recent versions

- 4.0.0 (latest) — 2022-04-09
- 3.2.1 — 2022-04-09
- 3.2.0 — 2022-04-09
- 3.1.0 — 2022-04-09
- 3.0.0 — 2022-04-09
- 2.0.0 — 2022-04-08
- 1.4.1 — 2022-04-08
- 1.4.0 — 2022-04-08
- 1.3.0 — 2022-04-08
- 1.2.0 — 2022-04-08
- 1.1.0 — 2022-04-08
- 1.0.0 — 2022-04-08

## README

# Dozehost 🚀
<tt>made by Fabboy </tt>
<hr>
<br>

### 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? ⚙️
1. Install the NPM package
```
npm install dozehost
```
2. Create a server file where you can host your website for example "server.js"
3. 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
```            
4. Setup the Server script to run your website
   (This script can be various depending on your server setup)
```js
//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)
```
5. 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](https://github.com/Fabbboy/dozehost/blob/master/license.md).

---
_Source: https://npm.io/package/dozehost · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
