# micro-express

> Small and simple server for big purposes (Size=>micro,Work=>expess)

Latest version **2.0.9** (published 2017-12-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install micro-express
pnpm add micro-express
yarn add micro-express
bun add micro-express
```

## 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 | 2.0.9 |
| Published | 2017-12-26 |
| First published | 2017-12-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | veera |
| Maintainers | veera83372 |
| Keywords | node, basic, server |

## Links

- npm: https://www.npmjs.com/package/micro-express
- Repository: https://github.com/veera83372/micro-express
- Homepage: https://github.com/veera83372/micro-express#readme
- Issues: https://github.com/veera83372/micro-express/issues
- npm.io page: https://npm.io/package/micro-express

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.0.9 (latest) — 2017-12-26
- 2.0.5 — 2017-12-26
- 2.0.3 — 2017-12-26
- 2.0.2 — 2017-12-26
- 2.0.0 — 2017-12-26
- 1.1.3 — 2017-12-26
- 1.1.2 — 2017-12-26
- 1.1.1 — 2017-12-26
- 1.1.0 — 2017-12-26
- 1.0.8 — 2017-12-26
- 1.0.7 — 2017-12-26
- 1.0.6 — 2017-12-25
- 1.0.5 — 2017-12-25
- 1.0.4 — 2017-12-25
- 1.0.3 — 2017-12-25
- … 2 more at https://npm.io/package/micro-express/versions

## README

# Micro-Expres

[![CircleCI](https://circleci.com/bb/veera83372/command-line-argumnets-parser/tree/master.svg?style=shield&circle-token=a723bccdc76d4581bf70d5a59b590244067fa307)](https://circleci.com/bb/veera83372/command-line-argumnets-parser/tree/master)       ![](https://travis-ci.org/veera83372/command-line-arguments-parser.svg?branch=master) [![Join the chat at https://gitter.im/command-line-arguments-parser/Lobby](https://badges.gitter.im/command-line-arguments-parser/Lobby.svg)](https://gitter.im/command-line-arguments-parser/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![npm](https://img.shields.io/npm/dt/express.svg)](https://www.npmjs.com/package/command-line-arguments-parser)

This is a basic http server framework written in Javascript that helps in implementing a basic server which handles GET and POST request .


## Installation

`npm install micro-express`

## Usage

```javascript
const Server = require('micro-express');

let server=new Server(8080);

//You can add GET request handler by using get method
//You can add POST request handler by using post method


//It will take two parameters first one path and callback to call when request arrived at that path
//You can access query parameters through req.queryParams in GET request

server.get(path,callback);

//You can access query parameters through req.body in POST request

server.post(path,callback);

//you can start the server
server.start();

//if you want serve files then create a public directory and put your files there
//whenever you got that request without adding handler your server will serve those files


//In your callback you can access this.respond method to serve data
this.respond(res, content, statusCode, headerOptions, [encoding]);

```


# Examples

#### Basic '/' Handling server
```javascript
const Server = require('micro-express');

let server=new Server(8080);

server.get('/',function (req,res) {
  this.respond(res,'hello',200,{'content-type':'text/html'});
});

server.post('/',function (req,res) {
  this.respond(res,'hello',200,{'content-type':'text/html'});
});

server.start();

```

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