mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +00:00 
			
		
		
		
	 154fc28a57
			
		
	
	
		154fc28a57
		
	
	
	
	
		
			
			As a result of taking a look on PR #1967 I realized there is 819 executable files in this repository. It is obvious this is an error.
		
			
				
	
	
		
			30 lines
		
	
	
		
			647 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			647 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /* eslint consistent-return:0 */
 | |
| 
 | |
| const resolve = require('path').resolve;
 | |
| 
 | |
| const express = require('express');
 | |
| const argv = require('minimist')(process.argv.slice(2));
 | |
| 
 | |
| const logger = require('./logger');
 | |
| const setup = require('./middlewares/frontendMiddleware');
 | |
| 
 | |
| const app = express();
 | |
| 
 | |
| setup(app, {
 | |
|   outputPath: resolve(process.cwd(), 'build'),
 | |
|   publicPath: '/',
 | |
| });
 | |
| 
 | |
| // get the intended port number, use port 3000 if not provided
 | |
| const port = argv.port || process.env.PORT || 3000;
 | |
| 
 | |
| // Start your app.
 | |
| app.listen(port, (err) => {
 | |
|   if (err) {
 | |
|     return logger.error(err.message);
 | |
|   }
 | |
| 
 | |
|   // Print start logs.
 | |
|   logger.appStarted(port);
 | |
| });
 |