Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express get raw path

const url = require('url');
const express = require('express');

const app = express();
app.use((req, res, next) => {
  const path = url.parse(req.url).path;
  // Do something...
});

const port = 3000;
app.listen(port, console.log(`Listening on port ${port}.`));
 
PREVIOUS NEXT
Tagged: #express #raw #path
ADD COMMENT
Topic
Name
4+4 =