Skip to content

Middleware for express to accept plain text on posts

Notifications You must be signed in to change notification settings

kaestlyn/plainTextParser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Plain/Text Parser

Middleware for express to accept plain text on posts

Installation

To install the stable version:

npm install plaintextparser --save

How to use

On your server file add the plainTextParser as a Express Middleware as below.

Import plainTextParser

let plainTextParser = require('plainTextParser');
app.use(plainTextParser());

OR

app.post(YOUR_ROUTE, plainTextParser, function(req, res) {             
  let text = req.text;

  //DO SOMETHING....
});

About

Middleware for express to accept plain text on posts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%