Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 272 Bytes

README.md

File metadata and controls

13 lines (10 loc) · 272 Bytes

express-answer

Convenience function for easier res.write

Usage

const server = require('express')();
const answer = require('express-answer');

server.get('/hello/:name', (req, res) => {
  answer(res, 200, { message: `Hello, ${req.params.name}!` }));
});