Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #68

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/*

validate-nlf/*
13 changes: 13 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"node": true,

"asi" : true,
"curly": false,
"esversion": 6,
"latedef": false,
"quotmark": true,
"undef": true,
"unused": false,
"trailing": true,
"-W117": true
}
22 changes: 11 additions & 11 deletions db/seeds/dev/seededLinks.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
const seedData = require('../seedData')

exports.seed = function(knex, Promise) {
return knex('links').del()
.then(function () {
let seedLinks = []
seedData.forEach(seed => {
seedLinks.push(createLink(knex, seed))
})
return Promise.all(seedLinks)
});
};

const createLink = (knex, link) => {
return knex('links').insert({
url: link.url,
Expand All @@ -21,3 +10,14 @@ const createLink = (knex, link) => {
updated_at: link.updated_at
}, 'id')
};

exports.seed = function(knex, Promise) {
return knex('links').del()
.then(function () {
let seedLinks = []
seedData.forEach(seed => {
seedLinks.push(createLink(knex, seed))
})
return Promise.all(seedLinks)
});
};
14 changes: 14 additions & 0 deletions http.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const environment = process.env.NODE_ENV || 'development';
const configuration = require('./knexfile')[environment];
const database = require('knex')(configuration);

const express = require('express')
const app = express()
const bodyParser = require('body-parser')
const shortid = require('shortid');

app.set('port', process.env.PORT || 3001);
app.locals.title = 'Jet Fuel';

app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: true }))
1 change: 1 addition & 0 deletions node_modules/.bin/jshint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/shjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/strip-json-comments

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/cli/.npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

201 changes: 201 additions & 0 deletions node_modules/cli/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading