# create_a_framework

> writeHead framework

Latest version **0.3.0** (published 2015-09-20) · ISC license · 0 weekly downloads

## Install

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

## 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.3.0 |
| Published | 2015-09-20 |
| First published | 2015-09-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Clare Monahan |
| Maintainers | clareluna |

## Links

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

## Recent versions

- 0.3.0 (latest) — 2015-09-20
- 0.2.0 — 2015-09-20
- 0.1.0 — 2015-09-20

## README

SEA D49 Create a Framework
===============================

A lightweight framework that populates the writeHead either (200, {'Content-Type': 'text/plain'}) or (200, {'Content-Type': 'application/json'}) for GET requests

Additionally, starts router and server at specified ports. 

####Example
~~~Javascript

var app = require('./app');
var myRouter = new app.Router();

myRouter.get('/testRoute', function(err, res) {
	res.send(200, 'this is a test');
});

app.createServer(myRouter)

app.start(port, function() {console.log('server started on port: ' + port)});

~~~

####Functions

-__myRouter__ 
Sets the functionality to respond to get requests

-__myRouter.get([route], function(err, res) {
	res.send([statusCode], [request data])
});__
User provides route, status code, and request data to build the response from get request. If no status code provided, will default to 200.

-__app.createServer(myRouter)__
Creates the server

-__app.start([port], [callback])__
Sets the port that the server will run on. Additionally, has optional callback function to alert user that server is running

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