Catalog npm
Back to packageRELEASE DETAILS

0.1.4

npm

70

Your next web service powered only by 70 lines of goodness.

70asyncawaithttphttp/2jsonserverweb
Published31 Oct 2017
Direct dependencies1
Transitive dependenciesNot calculated

README

Current package documentation

Your next web service powered only by 70 lines of goodness.


70 serves web services and APIs, 70 has no dependencies, 70 has the essentials and all in 70 lines.

Features

  • Supports HTTP (HTTPS) and HTTP/2
  • Async/await response handling
  • Simple Router
  • Body parser
  • Query parser

Getting Started

Install from npm:

npm install 70 --save

Create a set of routes with http or https server and configure as needed:

const http = require('http');
const { handle } = require('70');

const routes = {
  '/': () => ({ message: "Welcome to 70!" })
};

http.createServer(handle({ routes })).listen(8080);

Parse request body and send a response:

const http = require('http');
const { handle, json } = require('70');

const routes = {
  '/endpoint': async (stream) => {
    const body = await json(stream);
    return { success: true, body };
  }
};

http.createServer(handle({ routes })).listen(8080);

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
create-cert
Environment
{
  "local_name": "create-cert",
  "alias": false,
  "peer_metadata": null
}
^1.0.6development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-x6o0RqBpHQVNRlUF4227MbyImM5yneFusJ34Ij3nn7qpPbx56XlRH9YiMmcClLALvAyMMXqE/lBAWi5RP8gJuA==",
  "shasum": "775a93730a0e3959ce4e187affd74a0d47b84d8f",
  "tarball": "https://registry.npmjs.org/70/-/70-0.1.4.tgz",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQDC7WJsEbaVK+8WoTl1dlwHQNnKz8A+ff+PiVHIaUUx1wIhAPzIm6j4OEipcjHQsNPrsldUrJxmQEiAmQ13ctauRlOi"
    }
  ]
}

Repository

PENDING
quart-search/70

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:02 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:c503fddb8562cee28eb029a2c9484475e2ced0a2fb2d72969fb116d8ea063af0

Other collected versions

0.1.631 Oct0.1.531 Oct0.1.329 Oct0.1.229 Oct0.1.129 Oct0.1.029 OctView all collected versions →