18 lines
425 B
JavaScript
18 lines
425 B
JavaScript
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) {
|
|
res.send(`<html><body style="background: ${req.query.colour};">${req.query.colour}</body></html>`)
|
|
})
|
|
|
|
app.listen(PORT, function () {
|
|
console.log(PORT)
|
|
})
|