# nanobe

> This is a bare-bones Node.js server with routing that doesn't require any node modules.

Latest version **0.1.3** (published 2019-03-30) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-03-30 |
| First published | 2019-02-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Christopher Black |
| Maintainers | christopher-black |

## Links

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

## Recent versions

- 0.1.3 (latest) — 2019-03-30
- 0.1.2 — 2019-02-28
- 0.1.1 — 2019-02-27
- 0.1.0 — 2019-02-27

## README

# Nanobe

Nanobe is a vanilla Node.js server with routing capabilities. It currently supports servering static files, routing, query parameters and post data. 

## Setup

- [Mocha](https://mochajs.org/) is required as a global dependency for running tests.
- `npm install` is required to install [Chai](https://www.chaijs.com/) for running tests.

### Testing

Run `npm test` to execute the tests.

## Features

- Request body parsed in `utilities.js`
- When requesting a folder, the server looks for `index.html` by default
- If a matching file is not found in the `public` folder, all routes are checked
- Unit testing for core features
- Ability to parse query parameters in `utilites.js`
- Support for nested routes and nested routers

## Future Plans

- [ ] Route parameters
- [ ] Additional testing
- [ ] Middleware support
- [ ] Security audit

## Resources

- https://adrianmejia.com/blog/2016/08/24/building-a-node-js-static-file-server-files-over-http-using-es6/
- https://medium.com/@grantspilsbury/dry-node-js-server-code-without-express-4db391a9ac60
- https://nodejs.org/api/fs.html#fs_fs_access_path_mode_callback
- https://mherman.org/blog/testing-node-js-with-mocha-and-chai/
- https://developer.mozilla.org/en-US/docs/Learn/Server-side/Node_server_without_framework
- https://www.chaijs.com/plugins/chai-http/

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