Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express')
- const app = express()
- const port = 3000
- const cache = {};
- app.post('/', (req, res) => {
- const id = req.query.id;
- const body = req.body;
- if (cache[id]) {
- cache[id] = [...cache[id], body]
- } else {
- cache[id] = [body]
- }
- res.status(200);
- })
- app.listen(port, () => {
- console.log(`Example app listening at http://localhost:${port}`)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement