perkeep/dev-appengine

40 lines
768 B
Plaintext
Raw Normal View History

#!/usr/bin/perl
use strict;
use FindBin qw($Bin);
use Getopt::Long;
sub usage {
die "Usage: dev-appengine [--wipe] [-a] -- [other_dev_appserver_opts]";
}
my $opt_wipe;
my $opt_all; # listen on all interfaces
GetOptions("wipe" => \$opt_wipe,
"all" => \$opt_all,
) or usage();
my $sdk = readlink("$Bin/appengine-sdk")
or die "No App Engine SDK symlink; please:\n \$ ln -s /path/to/appengine-go-sdk $Bin/appengine-sdk\n\n";
my @args = (
"$sdk/dev_appserver.py",
"--skip_sdk_update_check",
"--high_replication",
);
if ($opt_all) {
push @args, "-a", "0.0.0.0";
}
if ($opt_wipe) {
push @args, "--clear_datastore";
}
push @args, @ARGV;
push @args, "$Bin/server/go/appengine";
print "\$ @args\n";
exec(@args);