Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstevens19 committed Aug 6, 2024
1 parent f086c67 commit 6816d4d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
18 changes: 0 additions & 18 deletions core/src/streams/kafka.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,3 @@ impl Kafka {
Ok(())
}
}

// #[tokio::main]
// async fn main() {
// // Example usage
// let kafka_producer = KafkaProducer::new("localhost:9092").await.expect("Failed to create
// Kafka producer");
//
// // Example JSON message
// let message = serde_json::json!({
// "key": "value",
// "another_key": 123,
// });
//
// match kafka_producer.publish("message_id_123", "my_topic", "my_key", &message).await {
// Ok(_) => println!("Message published successfully!"),
// Err(err) => eprintln!("Failed to publish message: {:?}", err),
// }
// }
5 changes: 0 additions & 5 deletions streams_playground/webhook/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@ const bodyParser = require('body-parser');
const app = express();
const port = 5003;

// Middleware to parse JSON bodies
app.use(bodyParser.json());

// Middleware to parse URL-encoded bodies
app.use(bodyParser.urlencoded({ extended: true }));

// Webhook endpoint
app.post('/webhook', (req, res) => {
const receivedData = req.body;

console.log(`${new Date().toISOString()} - Received webhook data:`, receivedData);

// Respond with a 200 status and "OK" message
res.status(200).send('OK');
});

// Start the server
app.listen(port, () => {
console.log(`Listening for webhooks on port ${port}...`);
});

0 comments on commit 6816d4d

Please sign in to comment.