chore(api): Initialize backend
Simple Express server with TypeScript
This commit is contained in:
		
							parent
							
								
									83a505ffdb
								
							
						
					
					
						commit
						81bad9d71a
					
				
					 5 changed files with 3499 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								backend/src/app.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								backend/src/app.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| import express, {Express, Request, Response} from 'express'; | ||||
| 
 | ||||
| const app: Express = express(); | ||||
| 
 | ||||
| const port: string | number = process.env.PORT || 3000; | ||||
| 
 | ||||
| app.get('/', (_, res: Response) => { | ||||
|   res.json({ | ||||
|       message: 'Hello Dwengo!' | ||||
|   }); | ||||
| }); | ||||
| 
 | ||||
| app.listen(port, () => { | ||||
|     console.log(`Server is running at http://localhost:${port}`); | ||||
| }) | ||||
		Reference in a new issue