Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
skaegi committed Apr 14, 2016
1 parent 76b2fca commit 8cb4972
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 0 deletions.
29 changes: 29 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*eslint-env node*/

//------------------------------------------------------------------------------
// hello world app is based on node.js starter application for Bluemix
//------------------------------------------------------------------------------

// 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();

// serve the files out of ./public as our main files
app.use(express.static(__dirname + '/public'));

// get the app environment from Cloud Foundry
var appEnv = cfenv.getAppEnv();

// start server on the specified port and binding host
app.listen(appEnv.port, '0.0.0.0', function() {

// print a message when the server starts listening
console.log("server starting on " + appEnv.url);
});
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "HelloWorldNodeApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "4.13.x",
"cfenv": "1.0.x"
},
"repository": {},
"engines": {
"node": "4.2.x"
}
}
Binary file added public/images/newapp-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>

<head>
<title>Hello World</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="stylesheets/style.css">
</head>

<body>
<table>
<tr>
<td style= "width:30%;">
<img class = "newappIcon" src="images/newapp-icon.png">
</td>
<td>
<h1>Hello world!</h1>
</td>
</tr>
</table>
</body>

</html>
82 changes: 82 additions & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/* style.css
* This file provides css styles.
*/

body,html {
background-color: #3b4b54; width : 100%;
height: 100%;
margin: 0 auto;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
color: #ffffff;
}

a {
text-decoration: none;
color: #00aed1;
}

a:hover {
text-decoration: underline;
}

.newappIcon {
padding-top: 10%;
display: block;
margin: 0 auto;
padding-bottom: 2em;
max-width:200px;
}

h1 {
font-weight: bold;
font-size: 2em;
}

.leftHalf {
float: left;
background-color: #26343f;
width: 45%;
height: 100%;
}

.rightHalf {
float: right;
width: 55%;
background-color: #313f4a;
height: 100%;
overflow:auto;
}

.blue {
color: #00aed1;
}


table {
table-layout: fixed;
width: 800px;
margin: 0 auto;
word-wrap: break-word;
padding-top:10%;
}

th {
border-bottom: 1px solid #000;
}

th, td {
text-align: left;
padding: 2px 20px;
}

.env-var {
text-align: right;
border-right: 1px solid #000;
width: 30%;
}

pre {
padding: 0;
margin: 0;
}

0 comments on commit 8cb4972

Please sign in to comment.