Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skibz/scuz
a restful web server with in-memory storage suitable for prototyping
https://github.com/skibz/scuz
Last synced: about 2 months ago
JSON representation
a restful web server with in-memory storage suitable for prototyping
- Host: GitHub
- URL: https://github.com/skibz/scuz
- Owner: skibz
- License: unlicense
- Created: 2016-02-01T08:55:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-03T11:57:05.000Z (almost 9 years ago)
- Last Synced: 2024-10-30T19:49:47.470Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# scuz [![Build Status](https://travis-ci.org/skibz/scuz.svg?branch=master)](https://travis-ci.org/skibz/scuz) [![Test Coverage](https://codeclimate.com/github/skibz/scuz/badges/coverage.svg)](https://codeclimate.com/github/skibz/scuz/coverage) [![Code Climate](https://codeclimate.com/github/skibz/scuz/badges/gpa.svg)](https://codeclimate.com/github/skibz/scuz)
> a restful web server with in-memory storage suitable for prototyping
##### example
```javascript
var http = require('http');
var scuz = require('scuz');
var server = scuz();http.get('http://localhost:1337/', function(res) {
res.pipe(process.stdout);
// {"error":false,"status":200,"message":"ok","body":{}}
}).on('error', console.log.bind(console));
```##### configuration
environment variable | default | type | description
-------------------- | ----------- | ------- | -----------
`SCUZ_STORAGE_NAME` | `scuz.json` | string | overrides the default storage name
`SCUZ_SAVE_INTERVAL` | unset | integer | interval value in milliseconds
`SCUZ_SAVE_ON_EXIT` | unset | n/a | save in-memory storage to `scuz.json` on exit
`SCUZ_LOAD_STORAGE` | unset | n/a | load `scuz.json` into memory at bootstrap
`SCUZ_PORT` | `1337` | integer | port to which the web server will be bound##### notes
this api server doesn't support node 0.8 and lower, though that isn't likely to be a problem for anyone.