import express from 'express';
import axios from 'axios';

const app = express();
app.use(express.json());

app.post('/api/proxy-endpoint', async (req, res) => {
  try {
    const response = await axios.post('https://thirdparty.com/api', req.body, {
      headers: {
        'API-KEY': process.env.API_KEY,
        'API-SECRET': process.env.API_SECRET,
      },
    });
    res.json(response.data);
  } catch (error) {
    res.status(500).json({ error: 'Something went wrong' });
  }
});

app.listen(3001, () => console.log('Server running on port 3001'));

Beta Mode Active