mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			533 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			533 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
#!/usr/bin/env node
 | 
						|
import { CommandLineParser } from './src/command-line.js';
 | 
						|
import { serverDirectory } from './src/server-directory.js';
 | 
						|
 | 
						|
// config.yaml will be set when parsing command line arguments
 | 
						|
const cliArgs = new CommandLineParser().parse(process.argv);
 | 
						|
globalThis.DATA_ROOT = cliArgs.dataRoot;
 | 
						|
globalThis.COMMAND_LINE_ARGS = cliArgs;
 | 
						|
process.chdir(serverDirectory);
 | 
						|
 | 
						|
try {
 | 
						|
    await import('./src/server-main.js');
 | 
						|
} catch (error) {
 | 
						|
    console.error('A critical error has occurred while starting the server:', error);
 | 
						|
}
 |