const express = require('express') const app = express() const port = 7860 const fetch = require('node-fetch'); app.get('/', (req, res) => { res.send('Hello World!') }) app.get('/api/test') async (req, res) => { try { res.json({message: "Hello world"}) } catch (error) { res.status(401).json({error: error.message}) } } app.listen(port, () => { console.log(`Example app listening on port ${port}`) })