mirror of
				https://github.com/whyour/qinglong.git
				synced 2025-10-31 08:56:06 +08:00 
			
		
		
		
	修复public服务
This commit is contained in:
		
							parent
							
								
									84c7ffc509
								
							
						
					
					
						commit
						9927461ea9
					
				|  | @ -5,7 +5,6 @@ import config from './config'; | ||||||
| 
 | 
 | ||||||
| const app = express(); | const app = express(); | ||||||
| 
 | 
 | ||||||
| const run = async () => { |  | ||||||
| app.get('/api/public/panel/log', (req, res) => { | app.get('/api/public/panel/log', (req, res) => { | ||||||
|   exec('pm2 logs panel --lines 500', (err, stdout, stderr) => { |   exec('pm2 logs panel --lines 500', (err, stdout, stderr) => { | ||||||
|     if (err || stderr) { |     if (err || stderr) { | ||||||
|  | @ -14,14 +13,12 @@ const run = async () => { | ||||||
|     return res.send({ code: 200, data: stdout }); |     return res.send({ code: 200, data: stdout }); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
| }; |  | ||||||
| 
 | 
 | ||||||
| app | app | ||||||
|   .listen(config.publicPort, async () => { |   .listen(config.publicPort, async () => { | ||||||
|     await require('./loaders/sentry').default({ expressApp: app }); |     await require('./loaders/sentry').default({ expressApp: app }); | ||||||
|     await require('./loaders/db').default(); |     await require('./loaders/db').default(); | ||||||
| 
 | 
 | ||||||
|     await run(); |  | ||||||
|     Logger.info(` |     Logger.info(` | ||||||
|       ################################################ |       ################################################ | ||||||
|       🛡️  Public listening on port: ${config.publicPort} 🛡️ |       🛡️  Public listening on port: ${config.publicPort} 🛡️ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 whyour
						whyour