Skip to content

Commit

Permalink
fixing faq and adding gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Thad Craft authored and pabloschuhmacher committed May 10, 2019
1 parent e64bd7d commit 8c0668c
Show file tree
Hide file tree
Showing 3 changed files with 562 additions and 31 deletions.
88 changes: 88 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

52 changes: 21 additions & 31 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var express = require('express'),
app = express(),
swig = require('swig'),
fs = require('fs'),
app = express(),
swig = require('swig'),
fs = require('fs'),
server;

// Template Engine Setup
Expand All @@ -14,44 +14,34 @@ app.set('view cache', false);

// Routes
app.get('/', function (req, res) {
var vcap_app = JSON.parse(process.env.VCAP_APPLICATION);
res.render('index', {
activePage: 'hello',
name: vcap_app.application_name,
host: process.env.CF_INSTANCE_IP,
port: process.env.PORT,
index: process.env.CF_INSTANCE_INDEX
});
var vcap_app = JSON.parse(process.env.VCAP_APPLICATION);
res.render('index', {
activePage: 'hello',
name: vcap_app.application_name,
host: process.env.CF_INSTANCE_IP,
port: process.env.PORT,
index: process.env.CF_INSTANCE_INDEX
});
});

app.get('/tour', function (req, res) {
res.render('tour', {
activePage: 'tour'
});
res.render('tour', {
activePage: 'tour'
});
});

app.get('/links', function (req, res) {
res.render('links', {
activePage: 'links'
});
app.get('/FAQ', function (req, res) {
res.render('FAQ', {
activePage: 'FAQ'
});
});

app.get('/crash', function () {
fs.readFile('somefile.txt', function (err, data) {
if (err) throw err;
console.log(data);
});
});




// Fire it up
server = app.listen(process.env.PORT || 3000, function () {

var host = server.address().address;
var port = server.address().port;
var host = server.address().address;
var port = server.address().port;

console.log('ExpressApp listening at http://%s:%s', host, port);
console.log('ExpressApp listening at http://%s:%s', host, port);

});
Loading

0 comments on commit 8c0668c

Please # to comment.