# starkserver

> A simple and easy to use NodeJS web server.

Latest version **1.7.0** (published 2017-05-31) · Apache-2.0 license · 0 weekly downloads

## Install

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

## 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 | 1.7.0 |
| Published | 2017-05-31 |
| First published | 2016-09-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dustin L. Dodson |
| Maintainers | fizzygalacticus |
| Keywords | web, server, simple, StarkServer, stark, http, https, configure, FizzyGalacticus |

## Links

- npm: https://www.npmjs.com/package/starkserver
- Repository: https://github.com/FizzyGalacticus/StarkServer
- Homepage: https://github.com/FizzyGalacticus/StarkServer#readme
- Issues: https://github.com/FizzyGalacticus/StarkServer/issues
- npm.io page: https://npm.io/package/starkserver

## Dependencies (4)

- [mime-types](https://npm.io/package/mime-types.md) ^2.1.11
- [httpdispatcher](https://npm.io/package/httpdispatcher.md) ^2.0.1
- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^2.0.0
- [simple-node-logger](https://npm.io/package/simple-node-logger.md) ^0.93.12

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.7.0 (latest) — 2017-05-31
- 1.6.3 — 2017-02-02
- 1.6.2 — 2017-01-02
- 1.5.2 — 2016-12-16
- 1.5.1 — 2016-11-22
- 1.5.0 — 2016-11-22
- 1.4.4 — 2016-10-27
- 1.3.4 — 2016-09-30
- 1.3.3 — 2016-09-27
- 1.2.3 — 2016-09-27
- 1.1.3 — 2016-09-22
- 1.0.3 — 2016-09-22
- 1.0.2 — 2016-09-20
- 1.0.1 — 2016-09-15

## README

# StarkServer

StarkServer is a simple, easy to use, and highly configurable web server written for NodeJS. I wanted a way to have a website up in seconds, without all of the extra gunk offered by other webservers.

With StarkServer, you can:
* Specify certain filetypes you'd like to serve.
* Host multiple domains from the same server (virtual hosts).
* Serve over HTTP and HTTPS.
* Easily write new Drivers to output to the web in *any* language.

### Tech

StarkServer uses the following technologies to serve your pages:

* [node.js]
  - fs
  - path
  - http
  - https
  - recursive-readdir
  - mime-types
  - simple-node-logger

### Installation

StarkServer requires [Node.js](https://nodejs.org/) v4.5+ to run.

Download and extract the [latest release](https://github.com/FizzyGalacticus/StarkServer/archive/master.zip).

Install the dependencies.

```sh
$ cd StarkServer
$ npm install
```

### Configure
There exists a JSON config file that is already setup with the options that are needed, just with generic inputs. You will need to make sure the ports are the ones you wish to bind to, the baseDirectory is set (the directory of your website), and any Drivers are setup if you need them. An example from my config looks like this:

```js
var config = {
    ports: {
        http: 80,
        https:443
    },
    ssl: {
        cert:'/home/www/certs/fullchain.pem',
        key: '/home/www/certs/key.pem'
    },
    domains: {
        localhost:{
                host            :['localhost', '127.0.0.1', 'hostname'],
                baseDirectory   :'/home/www/mywebsite',
                allowedFileTypes:['js','css','html'],
                index:'index.html',
                filesToIgnore: ['.gitignore'],
                directoriesToIgnore:['.git']
        }
    },
    drivers: {
        name: {
            DriverFile: 'drivers/php.js',
            fileTypes:['php']
        }
    }
};

module.exports = config;
```

### Run
Running the following should begin the server with your configurations.
```sh
$ node run.js
```

If this fails, try running as root/administrator. By default, you must be root to bind to port 80 and 443.
```sh
$ sudo node run.js
```

### Development

Want to contribute? That would be awesome!

I use [Waffle.io](https://waffle.io/FizzyGalacticus/StarkServer) to keep track of issues for this project.

License
-------

Apache 2.0

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