forked from juju/juju-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
executable file
·33 lines (25 loc) · 1.2 KB
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/node
/*
This file is part of the Juju GUI, which lets users view and manage Juju
environments within a graphical interface (https://launchpad.net/juju-gui).
Copyright (C) 2012-2013 Canonical Ltd.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License version 3, as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
General Public License for more details.
You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
'use strict';
// Serving of assets should be done relative to the project root.
// chdir into __dirname (of this module) so paths always work.
process.chdir(__dirname);
var server = require('./lib/server.js'),
config = require('./config').config.server;
var port = config.port || process.env.PORT || 8888;
server.server.listen(port, function() {
console.log('Server listening on http://localhost:' + port);
});