-
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.
- Loading branch information
0 parents
commit b58c4c0
Showing
2,031 changed files
with
286,633 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
eclipse.preferences.version=1 | ||
excluded=node_lib//*:node_modules//*:bower_components//* | ||
included=//*.jjs\://*.js\://*.jshintrc\://*.json\://*.mjs\://*.njs\://*.pjs://*.vjs | ||
projectSpecificOptions=true |
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,2 @@ | ||
eclipse.preferences.version=1 | ||
semanticValidation=disabled |
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,6 @@ | ||
## Feb 2, 2016 | ||
- Change engine to Node v4.2 | ||
- Update dependency versions to latest minor | ||
|
||
## Nov 16, 2015 | ||
- Added changelog |
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,3 @@ | ||
# Node.js Cloudant Starter Overview | ||
|
||
The Node.js Starter demonstrates how to use Bluemix service. The app displays a default page |
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,79 @@ | ||
/*jshint node:true*/ | ||
|
||
//------------------------------------------------------------------------------ | ||
// node.js starter application for Bluemix | ||
//------------------------------------------------------------------------------ | ||
|
||
// This application uses express as it's web server | ||
// for more info, see: http://expressjs.com | ||
var express = require('express'); | ||
var log4js = require('log4js'); | ||
var bodyParser = require('body-parser'); | ||
var petSearch = require('./services/petSearch'); | ||
var https = require('https'); | ||
var fs = require('fs'); | ||
var request = require('request'); | ||
|
||
// 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(); | ||
|
||
app.use(bodyParser.urlencoded({ | ||
extended: true | ||
})); | ||
// 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(); | ||
|
||
//console log is loaded by default, so you won't normally need to do this | ||
//log4js.loadAppender('console'); | ||
log4js.loadAppender('file'); | ||
//log4js.addAppender(log4js.appenders.console()); | ||
log4js.addAppender(log4js.appenders.file('logs/app.log'), 'app'); | ||
|
||
var logger = log4js.getLogger('app'); | ||
//The log level will be read from environment variable and replace the hardcode one | ||
// logger.setLevel('DEBUG'); | ||
// | ||
// logger.debug('Debug log entry'); | ||
// logger.info('Info log entry'); | ||
// logger.warn('Warn log entry'); | ||
// logger.error('Error log entry'); | ||
|
||
var allowCrossDomain = function(req, res, next) { | ||
res.header('Access-Control-Allow-Origin', '*'); | ||
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); | ||
res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization'); | ||
|
||
// intercept OPTIONS method | ||
if ('OPTIONS' == req.method) { | ||
res.send(200); | ||
} else { | ||
next(); | ||
} | ||
}; | ||
app.use(allowCrossDomain); | ||
|
||
// database.initDBConnection(); | ||
|
||
//Uncomment the following as part of Lab exercise | ||
//app.get('/findByTag', petSearch.findByTag); | ||
app.get('/findById', petSearch.findById); | ||
|
||
//Edits: Srinivas Cheemalapati Oct 05, 2016 | ||
|
||
app.get('/airport/status/:iata', petSearch.findStatus) | ||
{ | ||
console.log("got a get request for airport status"); | ||
}; | ||
|
||
app.listen(appEnv.port, appEnv.bind, function() { | ||
|
||
// print a message when the server starts listening | ||
logger.info("Server starting on " + appEnv.url); | ||
}); |
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,20 @@ | ||
[2016-10-03 21:20:28.021] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-05 17:38:06.343] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-05 17:39:42.170] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-05 17:40:24.928] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-05 17:41:37.996] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-05 17:45:14.314] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 17:06:40.063] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 17:32:23.191] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 17:33:57.359] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 17:46:08.590] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 18:12:07.003] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 18:24:48.354] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 18:40:59.916] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 18:46:07.679] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 18:46:50.020] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 18:50:33.753] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 18:54:25.136] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 18:58:33.121] [INFO] app - Server starting on http://localhost:6001 | ||
[2016-10-08 21:55:45.036] [INFO] app - Server starting on http://localhost:6002 | ||
[2016-10-08 21:58:28.054] [INFO] app - Server starting on http://localhost:6002 |
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 @@ | ||
[2016-10-04 21:25:15.523] [INFO] petSearch - petAPIURL : https://api.apim.ibmcloud.com/banchasetthananau1ibmcom-dev/sb/petstore/v2/pet/1441148360178?client_id=24caccbd-1a07-4e88-8f21-240e03586a3b&client_secret=G6xT5oB1aP0rN0oY3tS6aF2wA5gI8dM2lA7tF4iE5cK6mL4fK3 | ||
[2016-10-05 17:41:43.864] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/airport/status/RDU?format=json | ||
[2016-10-05 17:45:25.500] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json | ||
[2016-10-08 17:07:08.941] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=jsonclient_id=0605f6cd-3b05-4428-8ff4-83dbfea0be4a&client_secret=B3fT0eI3bM3dS4eO5rL6xG3pP8vL8yT0jO6hQ8kH7oD0cE0sW7 | ||
[2016-10-08 17:32:33.301] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json&client_id=0605f6cd-3b05-4428-8ff4-83dbfea0be4a&client_secret=B3fT0eI3bM3dS4eO5rL6xG3pP8vL8yT0jO6hQ8kH7oD0cE0sW7 | ||
[2016-10-08 17:34:02.150] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json?client_id=0605f6cd-3b05-4428-8ff4-83dbfea0be4a&client_secret=B3fT0eI3bM3dS4eO5rL6xG3pP8vL8yT0jO6hQ8kH7oD0cE0sW7 | ||
[2016-10-08 17:46:17.761] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json?X-IBM-Client-Id=0605f6cd-3b05-4428-8ff4-83dbfea0be4a&X-IBM-Client-Secret=B3fT0eI3bM3dS4eO5rL6xG3pP8vL8yT0jO6hQ8kH7oD0cE0sW7 | ||
[2016-10-08 18:12:13.150] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json | ||
[2016-10-08 18:24:55.250] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json | ||
[2016-10-08 18:24:58.684] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json | ||
[2016-10-08 18:25:17.543] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json | ||
[2016-10-08 18:27:18.012] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json | ||
[2016-10-08 18:41:06.340] [INFO] petSearch - airportAPIURL : https://api.us.apiconnect.ibmcloud.com/srinivausibmcom-bluemix-bootcamp/ctg-faa-status/airport/status/RDU?format=json |
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,11 @@ | ||
applications: | ||
- path: . | ||
memory: 512M | ||
instances: 1 | ||
domain: mybluemix.net | ||
name: Flight Status Node App | ||
host: Flight-Status-Node-App | ||
disk_quota: 1024M | ||
services: | ||
- API_Connect_Service_Flight_Status | ||
- Flight Status Node App-cloudantNoSQLDB |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.