Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contributing

- Fork this repository
- Take a ticket from the Ready section of the project page. (Some tickets in the Backlog may be ready for work, but are probably dependent on items in the Ready section - please check with maintainer if you're interested in Backlog work.)
- Create a topic branch. Branch names should begin with the issue number, followed by text describing the work. Please use lower-kebab-case (i.e. 2-readme-updated).
- Complete work
- Submit a pull request
- Necessary migrations have been created with the following commands:
- migration:create [ name of migration ]
- migration:up
- migration:down [ name of migration ]

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ A mongodb database named lizardboard must be created prior to starting the appli
- [React](https://facebook.github.io/react/)

## Testing
TBD
TBD
11 changes: 11 additions & 0 deletions database.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const DATABSE_URL = 'mongodb://127.0.0.1:27017/lizardboard';
const MongoClient = require('mongodb').MongoClient, assert = require('assert');

MongoClient.connect(DATABASE_URL, (err, response) => {
.then( DATABASE_URL => {
response.send('Successfully connected to the database')
})
.catch( error => {
response.render('error', { error: error })
});
});
25 changes: 25 additions & 0 deletions migrations/1477959880038-add-users.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';
const mongoose = require('mongoose');

/**
* Make any changes you need to make to the database here
*/

exports.up = function up (done) {
const add_users = new mongoose.Schema({
_id: {seq: 0},
name: {
first: String,
last: { type: String, trim: true }
},
email: {String}
});
done();
};

/**
* Make any changes that UNDO the up function side effects here (if possible)
*/
exports.down = function down(done) {
done();
};
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon ./bin/www"
"start": "nodemon ./bin/www",
"migration:create": "node_modules/.bin/migrate -d mongodb://localhost:27017/lizardboard create",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does create take parameters? If it does, does this work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it does. Are there any specific changes you would like to see? We haven't had trouble with running this script. In CONTRIBUTING.md there are further instructions for using this script.

"migration:up": "node_modules/.bin/migrate -d mongodb://localhost:27017/lizardboard up",
"migration:down": "node_modules/.bin/migrate -d mongodb://localhost:27017/lizardboard down"
},
"repository": {
"type": "git",
Expand All @@ -23,20 +26,20 @@
"debug": "~2.2.0",
"ejs": "^2.5.2",
"express": "~4.13.4",
"migrate-mongoose": "^2.0.2",
"mongoose": "^4.6.5",
"mocha": "^3.1.2",
"morgan": "~1.7.0",
"pug": "^2.0.0-beta6",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"react-router": "^2.6.1"
},
"devDependencies": {
"mocha": "^3.1.2",
"babel-cli": "^6.11.4",
"babel-core": "^6.13.2",
"babel-preset-es2015": "^6.13.2",
"babel-preset-react": "^6.11.1",
"mocha": "^3.1.2",
"nodemon": "^1.11.0",
"serve-favicon": "~2.3.0"
}
Expand Down
3 changes: 1 addition & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,4 @@ app.use(function(err, req, res, next) {
});
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra new line


module.exports = app;
module.exports = app;
1 change: 0 additions & 1 deletion views/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ block content

#root
script(src="/public/javascripts/index.js")

1 change: 0 additions & 1 deletion views/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ html
body
block content
script(src="/javascripts/index.js")