-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit - starter pack from Bluemix
- Loading branch information
Showing
19 changed files
with
452 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,34 @@ | ||
# StackMonkey | ||
Various monkey apps for stack and bluemix | ||
|
||
|
||
# Node.js Starter Application | ||
|
||
Bluemix provides a Node.js starter application as a template so that you can add your code and push the changes back to the Bluemix environment. | ||
|
||
|
||
## Files | ||
|
||
The Node.js starter application has files as below: | ||
|
||
* instructions.md | ||
|
||
This file describes the Next Steps for getting started with this template. | ||
|
||
* app.js | ||
|
||
This file contains the server side JavaScript code for your application written using the Node.js API | ||
|
||
* views/ | ||
|
||
This directory contains the views of the application. It is required by the express framework and jade template engine in this sample application. | ||
|
||
* public/ | ||
|
||
This directory contains public resources of the application. It is required by the express framework in this sample application. | ||
|
||
* package.json | ||
|
||
This file is required by the Node.js environment. It specifies this Node.js project name, dependencies, and other configurations of your Node.js application. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Node.js Starter Application | ||
|
||
Bluemix provides a Node.js starter application as a template so that you can add your code and push the changes back to the Bluemix environment. | ||
|
||
|
||
## Files | ||
|
||
The Node.js starter application has files as below: | ||
|
||
* instructions.md | ||
|
||
This file describes the Next Steps for getting started with this template. | ||
|
||
* app.js | ||
|
||
This file contains the server side JavaScript code for your application written using the Node.js API | ||
|
||
* views/ | ||
|
||
This directory contains the views of the application. It is required by the express framework and jade template engine in this sample application. | ||
|
||
* public/ | ||
|
||
This directory contains public resources of the application. It is required by the express framework in this sample application. | ||
|
||
* package.json | ||
|
||
This file is required by the Node.js environment. It specifies this Node.js project name, dependencies, and other configurations of your Node.js application. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/*jshint node:true*/ | ||
|
||
// app.js | ||
// This file contains the server side JavaScript code for your application. | ||
// This sample application uses express as web application framework (http://expressjs.com/), | ||
// and jade as template engine (http://jade-lang.com/). | ||
|
||
var express = require('express'); | ||
|
||
// setup middleware | ||
var app = express(); | ||
app.use(app.router); | ||
app.use(express.errorHandler()); | ||
app.use(express.static(__dirname + '/public')); //setup static public directory | ||
app.set('view engine', 'jade'); | ||
app.set('views', __dirname + '/views'); //optional since express defaults to CWD/views | ||
|
||
// render index page | ||
app.get('/', function(req, res){ | ||
res.render('index'); | ||
}); | ||
|
||
// There are many useful environment variables available in process.env. | ||
// VCAP_APPLICATION contains useful information about a deployed application. | ||
var appInfo = JSON.parse(process.env.VCAP_APPLICATION || "{}"); | ||
// TODO: Get application information and use it in your app. | ||
|
||
// VCAP_SERVICES contains all the credentials of services bound to | ||
// this application. For details of its content, please refer to | ||
// the document or sample of each service. | ||
var services = JSON.parse(process.env.VCAP_SERVICES || "{}"); | ||
// TODO: Get service credentials and communicate with bluemix services. | ||
|
||
// The IP address of the Cloud Foundry DEA (Droplet Execution Agent) that hosts this application: | ||
var host = (process.env.VCAP_APP_HOST || 'localhost'); | ||
// The port on the DEA for communication with the application: | ||
var port = (process.env.VCAP_APP_PORT || 3000); | ||
// Start server | ||
app.listen(port, host); | ||
console.log('App started on port ' + port); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Einführung in ${app} | ||
----------------------------------- | ||
Willkommen bei Ihrer neuen Node.js-Anwendung! | ||
|
||
Die Node.js-Anwendung wird in einer serverseitigen, stark skalierbaren, ereignisgesteuerten Hochleistungsumgebung mit nicht blockierender E/A ausgeführt, die in der Programmiersprache JavaScript geschrieben ist. | ||
|
||
1. [Das Befehlszeilentool 'cf' installieren](${doc-url}/#starters/BuildingWeb.html#install_cf). | ||
2. [Das Starteranwendungspaket herunterladen](${ace-url}/rest/apps/${app-guid}/starter-download). | ||
3. Das Paket extrahieren und nach `cd` wechseln. | ||
4. Verbindung zu Bluemix herstellen: | ||
|
||
cf api ${api-url} | ||
|
||
5. Bei Bluemix anmelden: | ||
|
||
cf login -u ${username} | ||
cf target -o ${org} -s ${space} | ||
|
||
6. Ihre Anwendung (App) bereitstellen: | ||
|
||
cf push ${app} | ||
|
||
7. Auf Ihre Anwendung (App) zugreifen: [${route}](//${route}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Empiece a trabajar con ${app} | ||
----------------------------------- | ||
Bienvenido a su nueva app Node.js. | ||
|
||
La app Node.js se ejecuta en un entorno de alto rendimiento del lado del servidor, altamente escalable y controlado por eventos, con un sistema de E/S sin bloqueo programado con el lenguaje de programación JavaScript. | ||
|
||
1. [Instale la herramienta de línea de mandatos cf](${doc-url}/#starters/BuildingWeb.html#install_cf). | ||
2. [Descargue el paquete de aplicación de inicio](${ace-url}/rest/apps/${app-guid}/starter-download). | ||
3. Extraiga el paquete y ejecute `cd` para ir al mismo. | ||
4. Conéctese a Bluemix: | ||
|
||
cf api ${api-url} | ||
|
||
5. Inicie la sesión en Bluemix: | ||
|
||
cf login -u ${username} | ||
cf target -o ${org} -s ${space} | ||
|
||
6. Despliegue su app: | ||
|
||
cf push ${app} | ||
|
||
7. Acceda a la app: [${ruta}](//${route}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Initiation à ${app} | ||
----------------------------------- | ||
Bienvenue dans votre nouvelle application Node.js ! | ||
|
||
L'application Node.js s'exécute dans un environnement géré par des événements, hautement évolutif et très performant côté serveur avec une | ||
entrée-sortie non bloquante en langage de programmation JavaScript. | ||
|
||
|
||
1. [Installez l'outil de ligne de commande cf](${doc-url}/#starters/BuildingWeb.html#install_cf). | ||
2. [Téléchargez le package d'applications du module de démarrage](${ace-url}/rest/apps/${app-guid}/starter-download). | ||
3. Procédez à l'extraction du package et placez-vous dans le répertoire correspondant à l'aide de la commande `cd`. | ||
4. Accédez à Bluemix : | ||
|
||
cf api ${url-api} | ||
|
||
5. Connectez-vous à Bluemix : | ||
|
||
cf login -u ${nom-utilisateur} | ||
cf target -o ${org} -s ${espace} | ||
|
||
6. Déployez votre application : | ||
|
||
cf push ${app} | ||
|
||
7. Accédez à votre application : [${route}](//${route}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Get started with StackMonkey | ||
----------------------------------- | ||
Welcome to your new Node.js app! | ||
|
||
Node.js app runs on a server-side high performance, highly scalable, event-driven environment with non-blocking I/O that is programmed with the JavaScript programming language. | ||
|
||
1. [Install the cf command-line tool](https://www.ng.bluemix.net/docs/#starters/BuildingWeb.html#install_cf). | ||
2. [Download the starter application package](https://console.ng.bluemix.net:443/rest/../rest/apps/87e82ab0-d0bd-4dc7-aca4-0ae5d58c33d1/starter-download). | ||
3. Extract the package and `cd` to it. | ||
4. Connect to Bluemix: | ||
|
||
cf api https://api.ng.bluemix.net | ||
|
||
5. Log into Bluemix: | ||
|
||
cf login -u [email protected] | ||
cf target -o [email protected] -s dev | ||
|
||
6. Deploy your app: | ||
|
||
cf push StackMonkey | ||
|
||
7. Access your app: [stackmonkey.mybluemix.net](//stackmonkey.mybluemix.net) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Introduzione a ${app} | ||
----------------------------------- | ||
Benvenuti nella nuova app Node.js! | ||
|
||
La app Node.js viene eseguita in un ambiente basato su eventi, altamente scalabile e ad elevate prestazioni sul lato server con I/O non bloccante programmato con il linguaggio JavaScript. | ||
|
||
1. [Installare lo strumento della riga di comando cf](${doc-url}/#starters/BuildingWeb.html#install_cf). | ||
2. [Scaricare il package applicazione starter](${ace-url}/rest/apps/${app-guid}/starter-download). | ||
3. Estrarre il package e `cd`. | ||
4. Connetti a Bluemix: | ||
|
||
cf api ${api-url} | ||
|
||
5. Accedi a Bluemix: | ||
|
||
cf login -u ${username} | ||
cf target -o ${org} -s ${space} | ||
|
||
6. Distribuisci la app: | ||
|
||
cf push ${app} | ||
|
||
7. Accedi alla app: [${route}](//${route}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
${app}: 始めに | ||
----------------------------------- | ||
新しい Node.js アプリへようこそ | ||
|
||
Node.js アプリは、サーバー・サイドのハイパフォーマンス、ハイ・スケーラブルなイベント・ドリブン環境で実行され、JavaScript プログラミング言語でプログラミングされるノンブロッキング I/O が使用されます。 | ||
|
||
1. [cf コマンド・ライン・ツールをインストールします](${doc-url}/#starters/BuildingWeb.html#install_cf)。 | ||
2. [スターター・アプリケーション・パッケージをダウンロードします](${ace-url}/rest/apps/${app-guid}/starter-download)。 | ||
3. パッケージを解凍し、そのパッケージに `cd` で移動します。 | ||
4. Bluemix への接続: | ||
|
||
cf api ${api-url} | ||
|
||
5. Bluemix へのログイン: | ||
|
||
cf login -u ${username} | ||
cf target -o ${org} -s ${space} | ||
|
||
6. アプリのデプロイ: | ||
|
||
cf push ${app} | ||
|
||
7. アプリへのアクセス: [${route}](//${route}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Introdução ao ${app} | ||
----------------------------------- | ||
Bem-vindo ao novo app Node.js! | ||
|
||
O app Node.js é executado em um ambiente acionado por evento, altamente escalável e de alto desempenho do lado do servidor com E/S sem bloqueio que é programada com a linguagem de programação JavaScript. | ||
|
||
1. [Instale a ferramenta de linha de comandos cf](${doc-url}/#starters/BuildingWeb.html#install_cf). | ||
2. [Faça o download do pacote de aplicativo iniciador](${ace-url}/rest/apps/${app-guid}/starter-download). | ||
3. Extraia o pacote e `cd` para ele. | ||
4. Conecte-se ao Bluemix: | ||
|
||
cf api ${api-url} | ||
|
||
5. Efetue login no Bluemix: | ||
|
||
cf login -u ${username} | ||
cf target -o ${org} -s ${space} | ||
|
||
6. Implemente seu app: | ||
|
||
cf push ${app} | ||
|
||
7. Acesse seu app: [${route}](//${route}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
${app} 入门 | ||
----------------------------------- | ||
欢迎使用新 Node.js 应用程序! | ||
Node.js 应用程序在服务器端的高性能、可高度扩展、以事件驱动的环境中运行,该环境具有以 JavaScript 编程语言编写的非阻塞的 I/O。 | ||
|
||
1. [安装 cf 命令行工具](${doc-url}/#starters/BuildingWeb.html#install_cf)。 | ||
2. [下载起动器应用程序包](${ace-url}/rest/apps/${app-guid}/starter-download)。 | ||
3. 将程序包和 `cd` 抽取到它。 | ||
4. 连接到 Bluemix: | ||
|
||
cf api ${api-url} | ||
|
||
5. 登录到 Bluemix: | ||
|
||
cf login -u ${username} | ||
cf target -o ${org} -s ${space} | ||
|
||
6. 部署您的应用程序: | ||
|
||
cf push ${app} | ||
|
||
7. 访问您的应用程序:[${route}](//${route}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
開始使用 ${app} | ||
----------------------------------- | ||
歡迎使用您的新 Node.js 應用程式! | ||
|
||
Node.js 應用程式在伺服器端的高效能、高度可調整、事件驅動的環境上執行,且使用以 JavaScript 程式設計語言設計的非阻擋式 I/O。 | ||
|
||
1. [安裝 cf 指令行工具](${doc-url}/#starters/BuildingWeb.html#install_cf)。 | ||
2. [下載入門範本應用程式套件](${ace-url}/rest/apps/${app-guid}/starter-download)。 | ||
3. 解開套件並 `cd` 到該處。 | ||
4. 連接至 Bluemix: | ||
|
||
cf api ${api-url} | ||
|
||
5. 登入 Bluemix: | ||
|
||
cf login -u ${username} | ||
cf target -o ${org} -s ${space} | ||
|
||
6. 部署您的應用程式: | ||
|
||
cf push ${app} | ||
|
||
7. 存取您的應用程式:[${route}](//${route}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
applications: | ||
- disk_quota: 1024M | ||
host: stackmonkey | ||
name: StackMonkey | ||
command: node app.js | ||
path: . | ||
domain: mybluemix.net | ||
instances: 1 | ||
memory: 128M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "NodejsStarterApp", | ||
"version": "0.0.1", | ||
"description": "A sample nodejs app for Bluemix", | ||
"dependencies": { | ||
"express": "3.4.7", | ||
"jade": "1.1.4" | ||
}, | ||
"engines": { | ||
"node": "0.10.*" | ||
}, | ||
"repository": {} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.