Created
August 23, 2023 17:59
-
-
Save BlazeInferno64/3aff83f2651df277853caf8e2a0e52f8 to your computer and use it in GitHub Desktop.
This file contains 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 express = require('express'); | |
const app = express(); | |
const bodyParser = require('body-parser'); | |
app.use(bodyParser.urlencoded({ extended: true })); | |
app.post('/submit', (req, res) => { | |
const formData = req.body; | |
// Process formData here | |
console.log(formData); | |
res.send('Form submitted successfully'); | |
}); | |
const PORT = 3000; | |
app.listen(PORT, () => { | |
console.log(`Server is running on port ${PORT}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A simple Form Submit server in express js to process the data