Created
April 6, 2018 15:34
-
-
Save mykeels/d4fd23aa538ce5f0c0f3a7e7c9f28c52 to your computer and use it in GitHub Desktop.
Revised Snippet from https://gist.github.com/mykeels/79ee2c3e9e50b9d4925eda5c065ca035
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const storage = {} | |
app.post('/', textBodyParser, (req, res) => { | |
storage[req.hash] = storage[req.hash] || req.body.split('\n').map((line) => line.split('').reverse().join('')).join('\n') | |
res.send(storage[req.hash]) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment