Skip to content

Instantly share code, notes, and snippets.

Created August 27, 2021 16:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
const express = require('express')
const app = express()
const port = 3000
const fs = require('fs')
app.use(express.urlencoded({ extended: true }))
let counter = 0'/', (req, res) => {
fs.writeFile(`response${counter}.json`, JSON.stringify(req.body), (err) => {
if (err) {
console.log("something happened saving the file")
console.log("body response was saved!")
app.listen(port, () => console.log(`Running`))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment