Giter Site home page Giter Site logo

servie-send's Introduction

Servie Send

NPM version NPM downloads Build status Test coverage

Create a HTTP response to send using Servie - a thin layer for creating a Response object with cache headers.

Installation

npm install servie-send --save

Usage

import {
  sendText,
  sendHtml,
  sendJson,
  sendStream,
  sendEmpty,
  entityTag
} from "servie-send";

function handle(req) {
  return sendText(req, "hello world!");
  return sendHtml(req, "<!doctype html>");
  return sendJson(req, { json: true });
  return sendStream(req, fs.createReadStream("example.txt"));
  return sendEmpty(req); // Nothing in response.
}

Options

  • status? Change the default response status code (200).
  • headers? Define the headers to use for the response.
  • contentType? Define content length for the response.
  • contentLength? Define content length for the response.
  • mtime? Define the modification Date for the response.
  • etag? Define an ETag for the response (e.g. pre-computed with entityTag() or true for on-demand).

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

Apache 2.0

servie-send's People

Contributors

blakeembrey avatar greenkeeper[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

servie-send's Issues

An in-range update of @types/node is breaking the build 🚨

Version 8.0.42 of @types/node was just published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.0.41
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… coverage/coveralls First build on greenkeeper/@types/node-8.0.42 at 77.698% Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ts-jest is breaking the build 🚨

Version 21.1.3 of ts-jest was just published.

Branch Build failing 🚨
Dependency ts-jest
Current Version 21.1.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

ts-jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 5 commits.

  • 0643b03 Merge pull request #348 from Bnaya/start-dir-cwd
  • c19b7e1 v21.1.3
  • ef4ad18 Update contributors list
  • d5c48ee Remove the column number from the check
  • 4037a83 Set config lookup point to cwd

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ts-jest is breaking the build 🚨

Version 20.0.3 of ts-jest just got published.

Branch Build failing 🚨
Dependency ts-jest
Current Version 20.0.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As ts-jest is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details,- βœ… coverage/coveralls First build on greenkeeper/ts-jest-20.0.3 at 77.857% Details

Commits

The new version differs by 3 commits0.

  • 29b4b7c Merge pull request #208 from kulshekhar/fix-collect-coverage
  • ad3460d Set a default value for transformOptions
  • 3143465 Use 'instrument' as proxy for 'collectCoverage'

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of jest is breaking the build 🚨

Version 20.0.2 of jest just got published.

Branch Build failing 🚨
Dependency jest
Current Version 20.0.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As jest is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
  • βœ… coverage/coveralls First build on greenkeeper/jest-20.0.2 at 77.857% Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/jest is breaking the build 🚨

Version 20.0.8 of @types/jest just got published.

Branch Build failing 🚨
Dependency @types/jest
Current Version 20.0.7
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As @types/jest is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of jest is breaking the build 🚨

Version 20.0.1 of jest just got published.

Branch Build failing 🚨
Dependency jest
Current Version 20.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As jest is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details,- ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of ts-jest is breaking the build 🚨

Version 21.2.0 of ts-jest was just published.

Branch Build failing 🚨
Dependency ts-jest
Current Version 21.1.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

ts-jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes 21.2.0

Enable using "ts-jest" package name directly (#363):

  "jest": {
    "transform": {
      "^.+\\.tsx?$": "ts-jest"
    },
Commits

The new version differs by 7 commits.

  • ce41e53 Merge pull request #363 from martijnthe/change-entry-to-preprocessor.js
  • da25825 Allow pre-release Jest in the next minor range
  • 36e5f9c Merge branch 'master' into change-entry-to-preprocessor.js
  • a4e32df Merge pull request #360 from totopsy/master
  • 8cf2d46 Update AUTHORS
  • bad01ec Change the package entry point to preprocessor.js itself
  • 7c24d0d FIX - README.md 2 times the same line

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.