Coin Tunnel

Awaiting status

Setting up a Node server

Just copy and paste this code!
const express = require('express');
const app = express();
var bodyParser = require('body-parser')
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
let port = 3000;
app.set('port', port);"/callback", async (req, res) => {
if (req.headers.verifac !== "your set verification string (So random people can't trick your server)") return res.status(401).send("Hackers suck");
// now you are certain that the server is who it says it is (Coin Tunnel)
if (req.body.status !== "ok") console.log(req.body) // If something went wrong
let note = req.body.note;
// You can then give the user something based on the note that you set earlier!
return res.send("That was easy!")
app.listen(port, () =>`Listening on port ${port}`));
Here's a walk-through of what's happening in the code. 1) We first set up the standard express node server 2) We then set up a place where Coin Tunnel can make POST requests 3) We check if the headers have the correct verifac header, which you set in your dashboard 4) That's it! (See, it's really simple)