Skip to content

Instantly share code, notes, and snippets.

@nmabhinandan
Created April 8, 2021 18:45
Show Gist options
  • Save nmabhinandan/c0105c28ba5a5ec2162601dd962d7de5 to your computer and use it in GitHub Desktop.
Save nmabhinandan/c0105c28ba5a5ec2162601dd962d7de5 to your computer and use it in GitHub Desktop.
powershell script to start and stop dgraph database
if($args[0] -eq "start") {
Start-Process -FilePath dgraph.exe -PassThru -WindowStyle hidden -ArgumentList "alpha", "--lru_mb 1024" -WorkingDirectory .
Start-Process -FilePath dgraph.exe -PassThru -WindowStyle hidden -ArgumentList "zero" -WorkingDirectory .
Start-Process -FilePath dgraph-ratel.exe -PassThru -WindowStyle hidden -WorkingDirectory .
} elseif($args[0] -eq "stop") {
Stop-Process -Name dgraph -Force
Stop-Process -Name dgraph-ratel -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment