├── .gitignore ├── app ├── views │ ├── articles │ │ ├── edit.html │ │ ├── new.html │ │ ├── index.html │ │ ├── index.mobile.html │ │ ├── article.html │ │ ├── show.html │ │ ├── show.mobile.html │ │ └── form.html │ ├── datasets │ │ ├── edit.html │ │ ├── new.html │ │ ├── index.mobile.html │ │ ├── dataset.html │ │ ├── show.mobile.html │ │ ├── show.html │ │ ├── index.html │ │ └── form.html │ ├── includes │ │ ├── footer.html │ │ ├── messages.html │ │ ├── head.html │ │ ├── header.html │ │ └── foot.html │ ├── 404.html │ ├── users │ │ ├── show.html │ │ ├── auth.html │ │ ├── login.html │ │ └── signup.html │ ├── 500.html │ ├── comments │ │ ├── form.html │ │ └── comment.html │ └── layouts │ │ ├── default.html │ │ └── mobile.html ├── mailer │ ├── templates │ │ └── comment.html │ └── index.js ├── controllers │ ├── tags.js │ ├── users.js │ └── datasets.js └── models │ ├── user.js │ ├── article.js │ └── dataset.js ├── Procfile ├── nodemon.json ├── .DS_Store ├── public ├── img │ ├── facebook.png │ ├── github.png │ ├── google.png │ ├── linkedin.png │ ├── twitter.png │ ├── glyphicons-halflings.png │ └── glyphicons-halflings-white.png ├── js │ ├── app.js │ ├── jquery.tagsinput.min.js │ └── bootstrap.min.js └── css │ ├── jquery.tagsinput.css │ ├── app.css │ └── bootstrap-responsive.min.css ├── scripts ├── README.md └── insert.js ├── config ├── env │ ├── env.json │ ├── test.js │ ├── production.js │ └── development.js ├── imager.js ├── config.js ├── passport │ ├── local.js │ ├── twitter.js │ ├── github.js │ ├── google.js │ ├── facebook.js │ └── linkedin.js ├── passport.js ├── middlewares │ └── authorization.js ├── express.js └── routes.js ├── test ├── helper.js ├── test-users.js └── test-articles.js ├── LICENSE.txt ├── server.js ├── package.json ├── lib └── utils.js └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /app/views/articles/edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'form.html' %} 2 | -------------------------------------------------------------------------------- /app/views/articles/new.html: -------------------------------------------------------------------------------- 1 | {% extends 'form.html' %} 2 | -------------------------------------------------------------------------------- /app/views/datasets/edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'form.html' %} 2 | -------------------------------------------------------------------------------- /app/views/datasets/new.html: -------------------------------------------------------------------------------- 1 | {% extends 'form.html' %} 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: ./node_modules/.bin/forever -m 5 server.js 2 | -------------------------------------------------------------------------------- /app/views/includes/footer.html: -------------------------------------------------------------------------------- 1 | {# copyright and footer links #} 2 | -------------------------------------------------------------------------------- /nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "execMap": { 3 | "js": "node --harmony" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriswhong/ReallySimpleOpenData/HEAD/.DS_Store -------------------------------------------------------------------------------- /public/img/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriswhong/ReallySimpleOpenData/HEAD/public/img/facebook.png -------------------------------------------------------------------------------- /public/img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriswhong/ReallySimpleOpenData/HEAD/public/img/github.png -------------------------------------------------------------------------------- /public/img/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriswhong/ReallySimpleOpenData/HEAD/public/img/google.png -------------------------------------------------------------------------------- /public/img/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriswhong/ReallySimpleOpenData/HEAD/public/img/linkedin.png -------------------------------------------------------------------------------- /public/img/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriswhong/ReallySimpleOpenData/HEAD/public/img/twitter.png -------------------------------------------------------------------------------- /public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriswhong/ReallySimpleOpenData/HEAD/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /app/views/404.html: -------------------------------------------------------------------------------- 1 | datdata{% extends 'layouts/default.html' %} 2 | 3 | {% block main %} 4 |
Hello {{ to }}
2 | 3 |{{ from }} has added a comment "{{ body }}" on your article {{ article }}
4 | 5 |Cheers
6 | -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | ##insert.js 2 | Populates the db with data.json from data.baltimorecity.gov 3 | 4 | - Make sure you have a valid user in the db 5 | - define `userObjectId` as the ObjectId of the user 6 | - run with `NODE_PATH` environment variable like `NODE_PATH=../config:../app/controllers node insert.js` -------------------------------------------------------------------------------- /app/views/500.html: -------------------------------------------------------------------------------- 1 | {% extends 'layouts/default.html' %} 2 | 3 | {% block main %} 4 |
10 | {{ error }}
11 |
12 | {% endif %}
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/config/env/env.json:
--------------------------------------------------------------------------------
1 | {
2 | "FACEBOOK_CLIENTID": "ID",
3 | "FACEBOOK_SECRET": "SECRET",
4 | "TWITTER_CLIENTID": "ID",
5 | "TWITTER_SECRET": "SECRET",
6 | "GITHUB_CLIENTID": "ID",
7 | "GITHUB_SECRET": "SECRET",
8 | "LINKEDIN_CLIENTID": "ID",
9 | "LINKEDIN_SECRET": "SECRET",
10 | "GOOGLE_CLIENTID": "ID",
11 | "GOOGLE_SECRET": "SECRET"
12 | }
13 |
--------------------------------------------------------------------------------
/app/views/comments/form.html:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/test/helper.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var mongoose = require('mongoose')
7 | , async = require('async')
8 | , Article = mongoose.model('Article')
9 | , User = mongoose.model('User')
10 |
11 | /**
12 | * Clear database
13 | *
14 | * @param {Function} done
15 | * @api public
16 | */
17 |
18 | exports.clearDb = function (done) {
19 | async.parallel([
20 | function (cb) {
21 | User.collection.remove(cb)
22 | },
23 | function (cb) {
24 | Article.collection.remove(cb)
25 | }
26 | ], done)
27 | }
28 |
--------------------------------------------------------------------------------
/app/views/layouts/default.html:
--------------------------------------------------------------------------------
1 | {% include '../includes/head.html' %}
2 |
3 |
4 | {% include '../includes/header.html' %}
5 |