Skip to content

Commit

Permalink
.bat file addded for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirbanBiswasGamer committed Apr 29, 2023
1 parent 5fdd57a commit aa7e0ee
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions start_bot.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@echo off

:: Check if Node.js is installed
where node >nul 2>nul
if %errorlevel% equ 1 (
echo Node.js not found. Installing...
:: Download and install Node.js
powershell -Command "Invoke-WebRequest -Uri 'https://nodejs.org/dist/latest/node.exe' -OutFile 'node.exe'"
node.exe /verysilent /install
del node.exe
echo Node.js installed.
) else (
echo Node.js found.
)

:: Install dependencies
echo Installing dependencies...
npm install
echo Dependencies installed.

:: Start the server
echo Starting server...
node server.js
echo Server started.

pause

0 comments on commit aa7e0ee

Please sign in to comment.