0.1.6 • Published 11 years ago

wayward v0.1.6

Weekly downloads
62
License
-
Repository
-
Last release
11 years ago

Minimal http framework with routes + body/param/file parsing.
Any routes which can not be found or have an incorrect http method will throw a 404.

npm install wayward

Further route options can be found here: https://github.com/aaronblohowiak/routes.js

var app = require('wayward')

app.get('/test/:param1/:param2?', function(req, res){
  console.log(req.params)

  res.writeHead(200, {'Content-Type': 'text/html'})
  res.end(data)
})

app.post('/test/:param1/:param2?', function(req, res){
  console.log(req.body) // post params
  console.log(req.params) // url segments
  console.log(req.files) // uploaded files

  res.writeHead(200, {'Content-Type': 'text/html'})
  res.end(data)
})

app.listen(3000)

Run the tests: npm test

Build Status

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

12 years ago

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago

0.0.8

12 years ago

0.0.9

12 years ago

0.0.7

12 years ago

0.0.6

12 years ago

0.0.5

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago