Barest of bare bones app.js
This commit is contained in:
		
							parent
							
								
									969cd0beb6
								
							
						
					
					
						commit
						50febb14bd
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								app.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								app.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| import 'dotenv/config'; | ||||
| import express from 'express'; | ||||
| 
 | ||||
| // Create an express app
 | ||||
| const app = express(); | ||||
| 
 | ||||
| // Get port, or default to 3000
 | ||||
| const PORT = process.env.PORT || 3000; | ||||
| 
 | ||||
| // Parse request body and verifies incoming requests using discord-interactions package
 | ||||
| app.use(express.json({ verify: VerifyDiscordRequest(process.env.PUBLIC_KEY) })); | ||||
| 
 | ||||
| app.listen(PORT, () => { | ||||
|     console.log('Listening on port', PORT); | ||||
| }); | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue