diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9eac20b --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Node modules +./node_modules + +# Notes and stuff +notes.txt +example.json + +# .gitignore Template +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# 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 (http://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/ + +# 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 diff --git a/README.md b/README.md index cb007d2..2161ac0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # project_what_have_you_done Build an application to help track the legislative activities of your local representatives. + + +https://github.com/unitedstates/congress-legislators +https://theunitedstates.io/congress-legislators/legislators-current.json diff --git a/app.js b/app.js new file mode 100644 index 0000000..bfe1cef --- /dev/null +++ b/app.js @@ -0,0 +1,70 @@ +var express = require("express"); +var path = require("path"); +var favicon = require("serve-favicon"); +var logger = require("morgan"); +var cookieParser = require("cookie-parser"); +var bodyParser = require("body-parser"); +var expressValidator = require('express-validator'); +var exphbs = require('express-handlebars'); +// var helpers = require('./helpers/helpers'); + +// Require each route +var index = require("./routes/index"); + +// Require keys +var keys = require("../../../Modules/Cles/items.js"); + +var app = express(); + +// view engine setup +app.engine('handlebars', exphbs({ + defaultLayout: 'main', + helpers: { + reps: function(items, options) { + var out = "
{{error.stack}}
diff --git a/views/home.handlebars b/views/home.handlebars
new file mode 100644
index 0000000..17e84b4
--- /dev/null
+++ b/views/home.handlebars
@@ -0,0 +1,36 @@
+Enter your address to display a list of your Congressional representatives and recent bills they have voted on.
+