feat(engine): remove proxy

This commit is contained in:
karishmas6
2024-04-18 21:39:02 +05:30
parent 1eeb218f1d
commit 784d54b7e1

View File

@@ -16,18 +16,6 @@ fastify.get('/', async (request, reply) => {
reply.send('Welcome to the Playwright Scraper API');
});
fastify.get('/proxy', async (request, reply) => {
const { url } = request.query;
try {
const response = await fetch(url);
const html = await response.text();
reply.type('text/html').send(html);
} catch (error) {
reply.status(500).send(`Error fetching website: ${error.message}`);
}
});
await fastify.listen(3000, (err, address) => {
if (err) throw err;
console.log(`Server listening on ${fastify.server.address().port}`)