├── .cfignore
├── .gitignore
├── public
├── images
│ └── newapp-icon.png
├── index.html
└── stylesheets
│ └── style.css
├── CHANGELOG.md
├── manifest.yml
├── package.json
├── .project
├── README.md
└── app.js
/.cfignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | launchConfigurations/
2 |
--------------------------------------------------------------------------------
/public/images/newapp-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/playground/dimage/master/public/images/newapp-icon.png
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## Feb 2, 2016
2 | - Change engine to Node v4.2
3 | - Change express version to 4.13
4 |
5 | ## Nov 16, 2015
6 | - Added changelog
7 |
--------------------------------------------------------------------------------
/manifest.yml:
--------------------------------------------------------------------------------
1 | applications:
2 | - path: .
3 | memory: 256M
4 | instances: 1
5 | domain: mybluemix.net
6 | name: dimage
7 | host: dimage
8 | disk_quota: 1024M
9 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "NodejsStarterApp",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node app.js"
7 | },
8 | "dependencies": {
9 | "express": "4.13.x",
10 | "cfenv": "1.0.x"
11 | },
12 | "repository": {},
13 | "engines": {
14 | "node": "4.x"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | nodejshelloworld
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | org.nodeclipse.ui.NodeNature
13 | org.eclipse.wst.jsdt.core.jsNature
14 |
15 |
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Node.js Starter Overview
2 |
3 | The Node.js Starter demonstrates a simple, reusable Node.js web application based on the Express framework.
4 |
5 | ## Run the app locally
6 |
7 | 1. [Install Node.js][]
8 | 2. Download and extract the starter code from the Bluemix UI
9 | 3. cd into the app directory
10 | 4. Run `npm install` to install the app's dependencies
11 | 5. Run `npm start` to start the app
12 | 6. Access the running app in a browser at http://localhost:6001
13 |
14 | [Install Node.js]: https://nodejs.org/en/download/
15 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NodeJS Starter Application
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | |
18 |
19 | Hello World You!!!
20 | Thanks for creating a NodeJS Starter Application.
21 | |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | /*eslint-env node*/
2 |
3 | //------------------------------------------------------------------------------
4 | // node.js starter application for Bluemix
5 | //------------------------------------------------------------------------------
6 |
7 | // This application uses express as its web server
8 | // for more info, see: http://expressjs.com
9 | var express = require('express');
10 |
11 | // cfenv provides access to your Cloud Foundry environment
12 | // for more info, see: https://www.npmjs.com/package/cfenv
13 | var cfenv = require('cfenv');
14 |
15 | // create a new express server
16 | var app = express();
17 |
18 | // serve the files out of ./public as our main files
19 | app.use(express.static(__dirname + '/public'));
20 |
21 | // get the app environment from Cloud Foundry
22 | var appEnv = cfenv.getAppEnv();
23 |
24 | // start server on the specified port and binding host
25 | app.listen(appEnv.port, '0.0.0.0', function() {
26 | // print a message when the server starts listening
27 | console.log("server starting on " + appEnv.url);
28 | });
29 |
--------------------------------------------------------------------------------
/public/stylesheets/style.css:
--------------------------------------------------------------------------------
1 | /* style.css
2 | * This file provides css styles.
3 | */
4 |
5 | body,html {
6 | background-color: #3b4b54; width : 100%;
7 | height: 100%;
8 | margin: 0 auto;
9 | font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
10 | color: #ffffff;
11 | }
12 |
13 | a {
14 | text-decoration: none;
15 | color: #00aed1;
16 | }
17 |
18 | a:hover {
19 | text-decoration: underline;
20 | }
21 |
22 | .newappIcon {
23 | padding-top: 10%;
24 | display: block;
25 | margin: 0 auto;
26 | padding-bottom: 2em;
27 | max-width:200px;
28 | }
29 |
30 | h1 {
31 | font-weight: bold;
32 | font-size: 2em;
33 | }
34 |
35 | .leftHalf {
36 | float: left;
37 | background-color: #26343f;
38 | width: 45%;
39 | height: 100%;
40 | }
41 |
42 | .rightHalf {
43 | float: right;
44 | width: 55%;
45 | background-color: #313f4a;
46 | height: 100%;
47 | overflow:auto;
48 | }
49 |
50 | .blue {
51 | color: #00aed1;
52 | }
53 |
54 |
55 | table {
56 | table-layout: fixed;
57 | width: 800px;
58 | margin: 0 auto;
59 | word-wrap: break-word;
60 | padding-top:10%;
61 | }
62 |
63 | th {
64 | border-bottom: 1px solid #000;
65 | }
66 |
67 | th, td {
68 | text-align: left;
69 | padding: 2px 20px;
70 | }
71 |
72 | .env-var {
73 | text-align: right;
74 | border-right: 1px solid #000;
75 | width: 30%;
76 | }
77 |
78 | pre {
79 | padding: 0;
80 | margin: 0;
81 | }
82 |
83 |
--------------------------------------------------------------------------------