Last active
January 5, 2018 20:08
-
-
Save n3phtys/4f3e3011412632c7ec5770b7da26477e to your computer and use it in GitHub Desktop.
Installs Cervisia-Server + Frontend (immediately runs it)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo Checking if you have git installed | |
echo Checking if you have nodejs + npm installed | |
echo Checking if you have angular-cli installed | |
echo Checking if you have rustup / rustc / cargo installed | |
REM start "" http://www.stackoverflow.com | |
echo Do you have git installed? | |
git --version >nul 2>&1 && ( | |
echo found git! | |
echo Do you have nodejs + npm installed? | |
npm --version >nul 2>&1 && ( | |
echo nodejs + npm found! | |
echo Do you have rustup installed? | |
rustup --version >nul 2>&1 && ( | |
echo rustup found! | |
rustup default nightly | |
ng --version >nul 2>&1 || ( | |
npm install -g @angular/cli | |
) | |
cd %userprofile% | |
@RD /S /Q "ng-cervisia" | |
@RD /S /Q "cervisia-server" | |
@RD /S /Q ".cervisia-server" | |
echo Removed directories | |
REM create config file: | |
mkdir .cervisia-server | |
echo Created directory for config | |
cd .cervisia-server | |
echo top_items_per_user = 4 >> Settings.toml | |
echo host = "localhost" >> Settings.toml | |
echo server_port = 8080 >> Settings.toml | |
echo web_path = "%userprofile:\=\\%\\ng-cervisia\\dist" >> Settings.toml | |
echo use_persistence = false >> Settings.toml | |
echo persistence_file_path = "./my-cervisia-lmdb.db" >> Settings.toml | |
echo #use_sendmail_instead_of_smtp = false >> Settings.toml | |
echo sender_email_address = "username@hostname.org" >> Settings.toml | |
echo smtp_host_address = "smtp.hostname.org" >> Settings.toml | |
echo smpt_credentials_loginname = "username" >> Settings.toml | |
echo smpt_credentials_password = "s3cr3t_p@ssw0rd" >> Settings.toml | |
echo smtp_port = 587 >> Settings.toml | |
cd .. | |
echo Created config | |
git clone https://github.com/n3phtys/ng-cervisia | |
cd ng-cervisia | |
npm install | |
ng build | |
echo Frontend built! Running backend... | |
cd .. | |
git clone https://github.com/n3phtys/cervisia-server | |
cd cervisia-server | |
pause | |
cargo build | |
echo It is done. you can run the executable in your File Explorer. | |
cd target | |
cd debug | |
start . | |
pause | |
) || ( | |
echo Rust not found, install from link and restart batch script | |
start "" https://rustup.rs/ | |
pause | |
) | |
) || ( | |
echo Nodejs+NPM not found, install from link and restart batch script | |
start "" https://nodejs.org/en/ | |
pause | |
) | |
) || ( | |
echo git not found, install from link and restart batch script | |
start "" https://git-scm.com/download/win | |
pause | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment