Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(151)

Side by Side Diff: test-server.js

Issue 9499043: Add AGPL license
Patch Set: Add AGPL license Created 11 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « server.js ('k') | test/browser.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /*
2 This file is part of the Juju GUI, which lets users view and manage Juju
3 environments within a graphical interface (https://launchpad.net/juju-gui).
4 Copyright (C) 2012-2013 Canonical Ltd.
5
6 This program is free software: you can redistribute it and/or modify it under
7 the terms of the GNU Affero General Public License version 3, as published by
8 the Free Software Foundation.
9
10 This program is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
12 SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
13 General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License along
16 with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
1 'use strict'; 19 'use strict';
2 20
3 // process.argv[2] will be 'debug' or 'prod' 21 // process.argv[2] will be 'debug' or 'prod'
4 22
5 var express = require('express'), 23 var express = require('express'),
6 server = express(), 24 server = express(),
7 fs = require('fs'), 25 fs = require('fs'),
8 path = require('path'); 26 path = require('path');
9 27
10 server.configure(function() { 28 server.configure(function() {
(...skipping 11 matching lines...) Expand all
22 server.get('/juju-ui/:file', function(req, res) { 40 server.get('/juju-ui/:file', function(req, res) {
23 var fileName = req.params.file; 41 var fileName = req.params.file;
24 res.sendfile('build-' + process.argv[2] + '/juju-ui/' + fileName); 42 res.sendfile('build-' + process.argv[2] + '/juju-ui/' + fileName);
25 }); 43 });
26 44
27 var port = 8084; 45 var port = 8084;
28 46
29 server.listen(port, function() { 47 server.listen(port, function() {
30 console.log(process.argv[2] + ' server listening on ' + port); 48 console.log(process.argv[2] + ' server listening on ' + port);
31 }); 49 });
OLDNEW
« no previous file with comments | « server.js ('k') | test/browser.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b