Lekcja 2
This commit is contained in:
1 parent
0d1dce5535
commit
72ed8ef789
612 files changed
+64975
No files matched your search
@@ -0,0 +1,21 @@
|
||||
const express = require("express")
|
||||
const app = express()
|
||||
const PORT = 3000
|
||||
|
||||
const path = require("path")
|
||||
|
||||
app.get("/", function (req, res) {
|
||||
res.sendFile(path.join(__dirname, '/static/formularz_get_1.html'))
|
||||
})
|
||||
|
||||
app.get("/handle_form", function (req, res) {
|
||||
console.log(req.query)
|
||||
if (req.query.radio != undefined) {
|
||||
console.log(req.query.radio)
|
||||
}
|
||||
res.send(req.query)
|
||||
})
|
||||
|
||||
app.listen(PORT, function () {
|
||||
console.log(PORT)
|
||||
})
|
||||
Reference in new issue
Block a user