https://github.com/for-get/server
Reference (NodeJS) implementation of a server running the state machine described by HTTP decision diagram v4.
https://github.com/for-get/server
Last synced: about 1 year ago
JSON representation
Reference (NodeJS) implementation of a server running the state machine described by HTTP decision diagram v4.
- Host: GitHub
- URL: https://github.com/for-get/server
- Owner: for-GET
- License: apache-2.0
- Created: 2013-06-09T15:43:03.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-04-20T22:02:47.000Z (over 12 years ago)
- Last Synced: 2025-06-06T19:13:37.567Z (about 1 year ago)
- Language: CoffeeScript
- Homepage:
- Size: 289 KB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# for-GET Server [![Build Status][2]][1]
for-GET Server is a reference implementation of an HTTP server running the for-GET Machine.
Currently it is wrapping the built-in NodeJS HTTP Server and only creates the structure of an HTTP transaction as prescribed by the for-GET Machine.
In the future, this server will be standalone running on top of the NodeJS TCP Server, and use PEG parsers for requests and generators for responses.
**This is part of a bigger effort: [for-GET HTTP](https://github.com/for-GET/README).**
## Status
This software is highly volatile; the v4 diagram has the same status.
## Usage
```bash
npm install for-get-server
```
```coffee
{
Server
Resource
} = require 'for-get-server'
class MyResource extends Resource
content_types_provided: () ->
{
'text/html': () -> '123'
}
app = new Server()
app.use '/', MyResource.middleware()
app.listen 8000
```
#### Shell
```bash
# Shortcut to start a server from a configuration file
for-get-server path_to_config
# Sample
make sample
```
## License
[Apache 2.0](LICENSE)
[1]: https://travis-ci.org/for-get/server
[2]: https://travis-ci.org/for-get/server.png