-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
27 lines (25 loc) · 1009 Bytes
/
app.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
/**
* Playground for own polymer components
* precondition is installation of bower and polyserve via npm install -g
* @main webcomponents
*/
'use strict';
//------------------------------------------------------------------------------
// node.js starter application for Bluemix
//------------------------------------------------------------------------------
// first checkin team server
// This application uses express as its web server
// for more info, see: http://expressjs.com
var express = require('express');
// cfenv provides access to your Cloud Foundry environment
// for more info, see: https://www.npmjs.com/package/cfenv
var cfenv = require('cfenv');
// create a new express server
var app = express();
// get the app environment from Cloud Foundry
var appEnv = cfenv.getAppEnv();
// serve the files out of ./public as our main files
app.use(express.static(__dirname + '/public'));
var server = app.listen(appEnv.port, function() {
console.log("server starting on " + appEnv.url);
});