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

Unified Diff: third_party/pkg/angular/demo/todo/webserver.js

Issue 1058283006: Update pubspecs and dependencies to get pkgbuild tests working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/angular/demo/todo/web/todo.dart ('k') | third_party/pkg/angular/genDocs.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/angular/demo/todo/webserver.js
diff --git a/third_party/pkg/angular/demo/todo/webserver.js b/third_party/pkg/angular/demo/todo/webserver.js
deleted file mode 100644
index 59fb2a0ff8cceceb950c45355610635d579b97b0..0000000000000000000000000000000000000000
--- a/third_party/pkg/angular/demo/todo/webserver.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var connect = require('connect');
-var dart2jsaas = require('dart2jsaas');
-var playback = require('../../playback_middleware/lib/middleware.js');
-
-var dart2jsaasEnpoints = dart2jsaas.endpoints({
- fetcherBaseUrl: 'http://localhost:3000/'
-});
-
-function endsWith(haystack, needle) {
- if (haystack.length < needle.length) return false;
-
- var index = haystack.indexOf(needle);
- return index == (haystack.length - needle.length);
-}
-
-var app = connect()
- .use(dart2jsaasEnpoints.dart2js)
- .use(dart2jsaasEnpoints.snapshot)
- .use(playback.endpoint())
- // Serve the /todos for the app.
- .use(function(req, res, next) {
- if (req.url.indexOf('/todos') != 0) {
- next();
- return;
- }
- var data = JSON.stringify([
- {text: 'Done from server', done: true},
- {text: 'Not done from server', done: false}
- ]);
-
- res.writeHead(200, {
- 'Content-Type': 'text/plain',
- 'Content-Length': data.length
- });
- res.end(data);
- })
- // Redirect the playback_data.dart file to the playback service.
- .use(function(req, res, next) {
- if (endsWith(req.url, '/playback_data.dart')) {
- res.writeHead(302, {
- 'Location': '/record'
- });
- res.end();
- return;
- }
- next();
- })
- .use(connect.static(process.cwd()));
-
-connect.createServer(app).listen(3000);
-
-console.log('Listening on port 3000');
« no previous file with comments | « third_party/pkg/angular/demo/todo/web/todo.dart ('k') | third_party/pkg/angular/genDocs.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698