mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	add /static dir for js files owo
This commit is contained in:
		
							parent
							
								
									52cebeb965
								
							
						
					
					
						commit
						b0591974c8
					
				| @ -88,7 +88,17 @@ app.get("/css/:id", (req, res) => { | ||||
|       // Serve the original file
 | ||||
|       res.sendFile(req.params.id, { root: html_location }); | ||||
|     } | ||||
| 
 | ||||
|     if (req.params.id.endsWith(".js")) { | ||||
|       res.redirect("/static/" + req.params.id); | ||||
|     } | ||||
|   }); | ||||
| 
 | ||||
|   app.get("/static/:id", (req, res) => { | ||||
|       if (req.params.id.endsWith(".css")) { | ||||
|       res.redirect("/css/" + req.params.id); | ||||
|     } | ||||
|      | ||||
|     res.sendFile(req.params.id, { root: html_location }); | ||||
|   }); | ||||
| }; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley