22 lines
		
	
	
		
			440 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			440 B
		
	
	
	
		
			JavaScript
		
	
	
	
const express = require('express');
 | 
						|
const app = express();
 | 
						|
const port = 3000;
 | 
						|
 | 
						|
// Middleware to parse JSON bodies
 | 
						|
app.use(express.json());
 | 
						|
 | 
						|
// Define a simple route
 | 
						|
app.get('/', (req, res) => {
 | 
						|
  res.send('Hello, World!');
 | 
						|
});
 | 
						|
 | 
						|
// Define another route
 | 
						|
app.get('/webhooks/webhook1', (req, res) => {
 | 
						|
  console.log(req.body)
 | 
						|
});
 | 
						|
 | 
						|
// Start the server
 | 
						|
app.listen(port, () => {
 | 
						|
  console.log(`Server is running on http://localhost:${port}`);
 | 
						|
});
 |