Giter Club home page Giter Club logo

pub-dartlang-dart's Introduction

pub-dartlang-dart

The https://pub.dartlang.org site.

Implemented in Dart as a Managed VM AppEngine application.

Running tests

The tests have been tested on Linux and Mac.

pub-dartlang-dart/ $ cd app
pub-dartlang-dart/app $ pub get
pub-dartlang-dart/app $ pub global activate test_runner
pub-dartlang-dart/app $ pub global run test_runner

Testing locally without gcloud preview app run

For local development, running the application directly instead of through gcloud preview app run, is typically most convenient. To do this use the main entry point in app/bin/server_io.dart. To change the application configuration look in this file for the instantiation of Configuration objects, e.g.

final devConfiguration = new Configuration.dev_io(<project-id>, <bucket>);

This will use the Cloud Datastore associated with the project <project-id> and the Cloud Storage bucket names <bucket-name>.

Running like this also requires a key for a Service Account for the project <project-id>. The location of that key is also configured in the Configuration object. The default is a file named key.json in the root of the project.

Testing locally with gcloud preview app run

Run the application with the local development server.

$ gcloud preview app run app.yaml

This will use the main entry point in app/bin/server.dart.

This will use the Cloud Datastore provided by the emulation provided by the local API server. The application cannot run on an empty datastore, a few configuration objects are required.

Check the Docker logs if the application crashes.

$ docker logs <container-id>

Deploing a new version to production

Before deploying make sure that the default production configuration is still active in app/bin/server.dart.

To deploy a new version to production use gcloud preview app deploy passing the project name dartlang-pub - if that project is not already set as the default project.

$ gcloud preview app --project dartlang-pub deploy app.yaml

This will deploy a new version with a unique version name generated by gcloud preview app deploy.

From Google Cloud SDK version 0.9.74 remote Docker builds are default, and a local Docker deamon is no longer required to deploy. Adding the option --docker-build=remote explicitly requests to deploy without using a local Docker deamon.

$ gcloud preview app --project dartlang-pub deploy --docker-build=remote app.yaml

Building locally is still supported throught he option --docker-build=local.

$ gcloud preview app --project dartlang-pub deploy --docker-build=local app.yaml

Deploing a new version to staging

To deploy a new version to staging use gcloud preview app deploy, but specify a version as well. This version must include the string staging to make the deployment run on staging data.

gcloud preview app --project dartlang-pub deploy app.yaml --version staging-my-test

pub-dartlang-dart's People

Contributors

kevmoo avatar mkustermann avatar nex3 avatar sethladd avatar sgjesse avatar whesse avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.