Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: app/bin/server_common.dart

Issue 917793002: Use pub_server package (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Dockerfile ('k') | app/lib/appengine_repository.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub_dartlang_org.server_common; 5 library pub_dartlang_org.server_common;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 import 'package:appengine/appengine.dart'; 10 import 'package:appengine/appengine.dart';
11 import 'package:gcloud/db.dart' as db; 11 import 'package:gcloud/db.dart' as db;
12 import 'package:gcloud/service_scope.dart'; 12 import 'package:gcloud/service_scope.dart';
13 import 'package:gcloud/storage.dart'; 13 import 'package:gcloud/storage.dart';
14 import 'package:gcloud/db.dart' show dbService; 14 import 'package:gcloud/db.dart' show dbService;
15 import 'package:gcloud/src/datastore_impl.dart' as datastore_impl; 15 import 'package:gcloud/src/datastore_impl.dart' as datastore_impl;
16 import 'package:googleapis_auth/auth_io.dart' as auth; 16 import 'package:googleapis_auth/auth_io.dart' as auth;
17 import 'package:logging/logging.dart'; 17 import 'package:logging/logging.dart';
18 import 'package:shelf/shelf.dart' as shelf; 18 import 'package:shelf/shelf.dart' as shelf;
19 import 'package:shelf/shelf_io.dart' as shelf_io; 19 import 'package:shelf/shelf_io.dart' as shelf_io;
20 20
21 import 'package:pubserver/shelf_pubserver.dart'; 21 import 'package:pub_server/shelf_pubserver.dart';
22 22
23 import 'package:pub_dartlang_org/appengine_repository.dart'; 23 import 'package:pub_dartlang_org/appengine_repository.dart';
24 import 'package:pub_dartlang_org/handlers.dart'; 24 import 'package:pub_dartlang_org/handlers.dart';
25 import 'package:pub_dartlang_org/templates.dart'; 25 import 'package:pub_dartlang_org/templates.dart';
26 import 'package:pub_dartlang_org/search_service.dart'; 26 import 'package:pub_dartlang_org/search_service.dart';
27 27
28 final String ProjectId = 'mkustermann-dartvm'; 28 final String ProjectId = 'mkustermann-dartvm';
29 final String PackageBucket = 'mkustermann--pub-packages'; 29 final String PackageBucket = 'mkustermann--pub-packages';
30 30
31 const List<String> SCOPES = const [ 31 const List<String> SCOPES = const [
(...skipping 19 matching lines...) Expand all
51 var searchService = await searchServiceViaApiKeyFromDb(); 51 var searchService = await searchServiceViaApiKeyFromDb();
52 registerSearchService(searchService); 52 registerSearchService(searchService);
53 registerScopeExitCallback(searchService.httpClient.close); 53 registerScopeExitCallback(searchService.httpClient.close);
54 } 54 }
55 55
56 shelf.Handler initPubServer() { 56 shelf.Handler initPubServer() {
57 var appengineRepo = new GCloudPackageRepo( 57 var appengineRepo = new GCloudPackageRepo(
58 dbService, storageService, storageService.bucket(PackageBucket)); 58 dbService, storageService, storageService.bucket(PackageBucket));
59 return new ShelfPubServer(appengineRepo).requestHandler; 59 return new ShelfPubServer(appengineRepo).requestHandler;
60 } 60 }
OLDNEW
« no previous file with comments | « Dockerfile ('k') | app/lib/appengine_repository.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698