pivoter-server/backend/index.js

25 lines
468 B
JavaScript
Raw Normal View History

2022-12-01 18:30:34 +00:00
const express = require("express")
const body_parser = require("body-parser")
const base = require("base-64")
2022-12-01 18:30:34 +00:00
const app = express()
const PORT = 443
// express configuration
app.use(body_parser.urlencoded({
extended: true
}))
// Backend - Routes
// API - Routes
app.post("/client-fetch-keys", (req, res) => { // client sends here the keys
let keys = req.body.keys
console.log(base.decode(keys));
2022-12-01 18:30:34 +00:00
res.send("PIVOTER_OK\n");
2022-12-01 18:30:34 +00:00
})
app.listen(PORT)