Server.js returns empty JSON

I’m attempting to use .js, using glitch, to retrieve Roblox’s API endpoint - however, it tends to return an empty JSON table {}, which potentially is a fault in the code. I don’t prior knowledge of .js as much with Lua, hence that’d be the case of misunderstanding operations:

const express = require("express")
const app = express()
var fetch = require("node-fetch")

app.get("/proxy", (req, res) => {
  var api = req.query["api"] //getting query
  var url = "https://" + api //adding "https://" onto the api for "absolute URL"
  var data = fetch(url, {method: "GET", headers: {}})
  console.log(data) //outputs "Promise { <pending> }"
  res.json(data) //send back the result with json encoding?

It still shows me Promise { <pending> } in console.log(result). (replenished code. see edit for the old one.)

--[ Variables
local http = game:GetService("HttpService")
local url = ""
local api = ""
local userId = 121227196
--[ Setup
url = url.."/proxy?api="..api.."/v1/users/"..userId
local data = http:GetAsync(url)
data = http:JSONDecode(data)

There is no need to provide optional arguments in fetch(), you can just do fetch(url) because the default method is GET.

var data = fetch(url).then(re=>re.json()).then(dt => res.json(dt));

This would fix it.
You could remove the lower lines then.