# express-js-mod

> An express like router for moddable sdk and XS javascript engine

Latest version **1.0.5** (published 2021-06-18) · GPLv2 license · 0 weekly downloads

## Install

```sh
npm install express-js-mod
pnpm add express-js-mod
yarn add express-js-mod
bun add express-js-mod
```

## 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.0.5 |
| Published | 2021-06-18 |
| First published | 2021-06-05 |
| Weekly downloads | 0 |
| License | GPLv2 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 54.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Daniel Ashcraft |
| Maintainers | daashcraft |
| Keywords | moddable,xs,express,embedded,iot |

## Links

- npm: https://www.npmjs.com/package/express-js-mod
- Repository: https://github.com/dashcraft/express-js-mod
- Issues: https://github.com/dashcraft/express-js-mod/issues
- npm.io page: https://npm.io/package/express-js-mod

## Recent versions

- 1.0.5 (latest) — 2021-06-18
- 1.0.3 — 2021-06-18
- 1.0.2 — 2021-06-06
- 1.0.1 — 2021-06-05
- 1.0.0 — 2021-06-05

## README

# Express JS Mod
This is a express like package for working in the [Moddable SDK](https://www.moddable.com/).
This is not meant to be a 1-1 port, but it attempts to maintain the same interface
we know from [express](https://expressjs.com/).

## Installation
`git clone https://github.com/dashcraft/express-js-mod.git` or `git clone git@github.com:dashcraft/express-js-mod.git`
`cd express-js-mod && yarn install`
`yarn build`

Copy the `/express-js-mod` folder into your moddable sdk project,
then add the express-js-mod package to your projects manifest.json includes:

`"./express-js-mod/manifest.json"`

## Usage
First import the primary package
`import  Express  from  'express-js-mod'`
Afterwards, when the moddable sdk server has been created...
`import { Server } from  "http";`

We can add routes and callbacks like...

    let  app = new Express(Server)
    app.get('/home', function(req,res) {
	    res.status(200)
	    res.json({test:  'test'})
    })
    let port = 80 // 80 is the default anyways
    app.listen(port)

## Todo

 - [ ] Tests, tests, more tests
 - [ ] Query Params
 - [ ] Inbound Data Handling
 - [ ] Post route test
 - [ ] Put/Patch route test
 - [ ] Delete route test
 - [ ] Support Hash of Routes using app.route()
 - [ ] Chunked Buffer handling
 - [ ] res.file()
	 - [ ] mime-types
	 - [ ] buffers
 - [ ] Event Streams
 - [ ] Add fallback route support
 - [ ] Add regex route matching support

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