mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			738 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			738 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
if ! command -v npm &> /dev/null
 | 
						|
then
 | 
						|
    read -p "npm is not installed. Do you want to install nodejs and npm? (y/n)" choice
 | 
						|
    case "$choice" in 
 | 
						|
      y|Y ) 
 | 
						|
        echo "Installing nvm..."
 | 
						|
        export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
 | 
						|
        [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
 | 
						|
        curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
 | 
						|
        source ~/.bashrc
 | 
						|
        nvm install node;;
 | 
						|
      n|N ) 
 | 
						|
        echo "Nodejs and npm will not be installed."
 | 
						|
        exit;;
 | 
						|
      * ) 
 | 
						|
        echo "Invalid option. Nodejs and npm will not be installed."
 | 
						|
        exit;;
 | 
						|
    esac
 | 
						|
fi
 | 
						|
 | 
						|
npm i
 | 
						|
node server.js
 |