Commit 39540343 authored by IBM Cloud's avatar IBM Cloud

Clone from zip

<?xml version="1.0" encoding="UTF-8"?>
This diff is collapsed.
# Node.js Hello World Sample
This application demonstrates a simple, reusable Node.js web application based on the Express framework.
## Run the app locally
1. [Install Node.js][]
1. cd into this project's root directory
1. Run `npm install` to install the app's dependencies
1. Run `npm start` to start the app
1. Access the running app in a browser at <http://localhost:6001>
[Install Node.js]:
/*eslint-env node*/
// node.js starter application for Bluemix
// This application uses express as its web server
// for more info, see:
var express = require('express');
// cfenv provides access to your Cloud Foundry environment
// for more info, see:
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, '', function() {
// print a message when the server starts listening
console.log("server starting on " + appEnv.url);
- path: .
name: 13unisep-nodejs
environment_json: {}
memory: 256M
instances: 1
disk_quota: 1024M
services: []
"name": "NodejsStarterApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app.js"
"dependencies": {
"express": "4.15.x",
"cfenv": "1.0.x"
"repository": {},
"engines": {
"node": "6.x"
<!DOCTYPE html>
<title>NodeJS Starter Application</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="stylesheets/style.css">
<td style= "width:30%;">
<img class = "newappIcon" src="images/newapp-icon.png">
<h1 id="message">Hello World!</h1>
<p class='description'></p> Thanks for creating a <span class = "blue">NodeJS Starter Application</span>.
/* 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;
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%;
.blue {
color: #00aed1;
table {
table-layout: fixed;
width: 800px;
margin: 0 auto;
word-wrap: break-word;
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;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment