# nsimplehttp

> Simple HTTP server on NodeJS for creating static or real-time projects via Socket.io.

Latest version **1.0.2** (published 2018-09-17) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

Provides the command `nsimplehttp`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-09-17 |
| First published | 2018-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.9.1 |
| Dependencies | 3 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nisael Moreira Gomes |
| Maintainers | nisaelmgomes |
| Keywords | Simple HTTP Server, Socket.io |

## Links

- npm: https://www.npmjs.com/package/nsimplehttp
- Repository: https://github.com/NisaelMoreiraGomes/Simple-NodeJs-HTTP-Server
- Homepage: https://github.com/NisaelMoreiraGomes/Simple-NodeJs-HTTP-Server#readme
- Issues: https://github.com/NisaelMoreiraGomes/Simple-NodeJs-HTTP-Server/issues
- npm.io page: https://npm.io/package/nsimplehttp

## Dependencies (3)

- [prompt](https://npm.io/package/prompt.md) ^1.0.0
- [socket.io](https://npm.io/package/socket.io.md) ^2.1.1
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.20

## 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.0.2 (latest) — 2018-09-17
- 1.0.1 — 2018-09-17
- 1.0.0 — 2018-09-17

## README

# N Simple HTTP
Simple HTTP Server on NodeJS for creating static or real-time projects via Socket.io.
## Install
```bash
npm install -g nsimplehttp
```
## Start Server
```bash
nsimplehttp
```
or
```bash
nsimplehttp dirPublic "your directory without the / at the end"
```
or
```bash
nsimplehttp dirPublic "your directory without the / at the end" serverPort 8080
```
## Run Script in NodeJs
You have complete freedom to expand the script that will run on NodeJs using the path of your Javascript code that will be run internally. To do this, just enter the path in the terminal in the script field to run in the backend. Then export a node module in function form and retrieve the parameters, as in the example below:

```javascript
modules.export = function(createServer, socket) {

    const io = socket(createServer);
    //Your Code...    
};
```
## Custom Page 404
You have complete freedom to create a 404 page, you do not have to configure anything. Just create a 404.html name file at the root of your project.

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