From 9ae5ed94f607e41db4752a622efae54a946d99f1 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 15:03:30 -0700 Subject: [PATCH 01/33] ready for heroku deploy attempt #1 --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 22718d9e..8ad80d95 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,11 @@ "homepage": "https://github.com/SF-WDI-LABS/express-personal-api", "dependencies": { "body-parser": "^1.15.0", + "bower": "^1.8.0", "express": "^4.13.4", - "mongoose": "^4.4.10" + "express-session": "^1.15.5", + "method-override": "^2.3.9", + "mongoose": "^4.4.10", + "nodemon": "^1.11.0" } } From e720a5ed61e49952fb2086240f88d657720d2287 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 15:26:02 -0700 Subject: [PATCH 02/33] Starter info --- models/campsite.js.example | 10 ---------- models/index.js | 2 +- models/skatepark.js | 10 ++++++++++ seed.js | 18 +++++++++--------- server.js | 6 +++--- 5 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 models/campsite.js.example create mode 100644 models/skatepark.js diff --git a/models/campsite.js.example b/models/campsite.js.example deleted file mode 100644 index cb9e8ee6..00000000 --- a/models/campsite.js.example +++ /dev/null @@ -1,10 +0,0 @@ -// var mongoose = require('mongoose'), -// Schema = mongoose.Schema; - -// var CampsiteSchema = new Schema({ -// description: String -// }); - -// var Campsite = mongoose.model('Campsite', CampsiteSchema); - -// module.exports = Campsite; diff --git a/models/index.js b/models/index.js index 66997fe0..ee517a75 100644 --- a/models/index.js +++ b/models/index.js @@ -2,4 +2,4 @@ var mongoose = require("mongoose"); mongoose.connect( process.env.MONGODB_URI || "mongodb://localhost/personal-api", {useMongoClient: true}); mongoose.Promise = global.Promise; // use native Promise -// module.exports.Campsite = require("./campsite.js.example"); +module.exports.Skatepark = require("./skatepark.js"); diff --git a/models/skatepark.js b/models/skatepark.js new file mode 100644 index 00000000..b50a8a18 --- /dev/null +++ b/models/skatepark.js @@ -0,0 +1,10 @@ +var mongoose = require('mongoose'), + Schema = mongoose.Schema; + +var SkateparkSchema = new Schema({ + description: String +}); + +var Skatepark = mongoose.model('Skatepark', SkateparkSchema); + +module.exports = Skatepark; diff --git a/seed.js b/seed.js index 896dead0..136fb433 100644 --- a/seed.js +++ b/seed.js @@ -1,15 +1,15 @@ // This file allows us to seed our application with data // simply run: `node seed.js` from the root of this project folder. -// var db = require('./models'); +var db = require('./models'); -// var new_campsite = {description: "Sharp rocks. Middle of nowhere."} +var new_skatepark = {description: "Sharp rocks. Middle of nowhere."} -// db.Campsite.create(new_campsite, function(err, campsite){ -// if (err){ -// return console.log("Error:", err); -// } +db.Skatepark.create(new_skatepark, function(err, skatepark){ + if (err){ + return console.log("Error:", err); + } -// console.log("Created new campsite", campsite._id) -// process.exit(); // we're all done! Exit the program. -// }) + console.log("Created new skatepark", skatepark._id) + process.exit(); // we're all done! Exit the program. +}) diff --git a/server.js b/server.js index fd366289..bed6790b 100644 --- a/server.js +++ b/server.js @@ -49,12 +49,12 @@ app.get('/api', function apiIndex(req, res) { res.json({ woopsIForgotToDocumentAllMyEndpoints: true, // CHANGE ME ;) message: "Welcome to my personal api! Here's what you need to know!", - documentationUrl: "https://github.com/example-username/express-personal-api/README.md", // CHANGE ME - baseUrl: "http://YOUR-APP-NAME.herokuapp.com", // CHANGE ME + documentationUrl: "https://github.com/deathofasellout/express-personal-api/README.md", // CHANGE ME + baseUrl: "https://immense-cove-18493.herokuapp.com/", // CHANGE ME endpoints: [ {method: "GET", path: "/api", description: "Describes all available endpoints"}, {method: "GET", path: "/api/profile", description: "Data about me"}, // CHANGE ME - {method: "POST", path: "/api/campsites", description: "E.g. Create a new campsite"} // CHANGE ME + {method: "POST", path: "/api/skateparks", description: "E.g. Create a new skatepark"} // CHANGE ME ] }) }); From 9fec3960725b7c692adb55313ce886208adc5b1e Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 15:41:57 -0700 Subject: [PATCH 03/33] Jumbotron added --- views/index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/views/index.html b/views/index.html index 48e39ae6..4efd59c6 100644 --- a/views/index.html +++ b/views/index.html @@ -12,11 +12,19 @@ + + +
+
+

Welcome to Skatespot.com

+

Find a Skatepark!

+
+
From 78b8770c9fb01019f19fc272e949154e93e94569 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 15:49:33 -0700 Subject: [PATCH 04/33] image --- public/styles/styles.css | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/public/styles/styles.css b/public/styles/styles.css index 57b4da0e..70cf2c13 100644 --- a/public/styles/styles.css +++ b/public/styles/styles.css @@ -1,10 +1,15 @@ -body { - color: #333; - font-family: Helvetica, Arial, sans-serif; - background-color: skyblue; /* Sanity Check! */ +.jumbotron { + background-image: url(http://www.revolution.co.za/wp-content/uploads/2015/02/Screen-shot-2015-02-13-at-10.41.00-AM.jpg); + background-size: cover; + background-repeat: no-repeat; + color: #EEE; +} +.jumbotron .container { + height: 350px; } -h1 { - margin-top: 100px; - text-align: center; +.inline-header { + display: inline-block; + vertical-align: baseline; + margin-right: 12px; } From d54c9d9e9d1a921ace6b817e76587d0dc9639370 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 15:53:55 -0700 Subject: [PATCH 05/33] start of forms --- views/index.html | 120 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 118 insertions(+), 2 deletions(-) diff --git a/views/index.html b/views/index.html index 4efd59c6..a4f1b716 100644 --- a/views/index.html +++ b/views/index.html @@ -21,8 +21,8 @@
-

Welcome to Skatespot.com

-

Find a Skatepark!

+

Skatespot.com

+

Find a Skatespot!

@@ -33,5 +33,121 @@

Read My API Documentation

+ + +
+
+
+ +
+
+ + + Add New Album + + +
+ +
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+ +
+ +
+
+ + + +
+ +
+ +
+
+
+
+
+
+
+ + + + + + +
+
+
+

Albums

+
+
+ + +
+ +
+ + + + + From 96df66712554acba38f2825ff0da71521bf226d0 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 15:57:22 -0700 Subject: [PATCH 06/33] HTML --- views/index.html | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/views/index.html b/views/index.html index a4f1b716..c93137fc 100644 --- a/views/index.html +++ b/views/index.html @@ -25,15 +25,6 @@

Skatespot.com

Find a Skatespot!

-
-
-
-

Under Construction

-

Read My API Documentation

-
-
-
-
@@ -43,11 +34,11 @@

Read My API Documentation

- Add New Album + Add New Skatespot
- +
@@ -56,7 +47,7 @@

Read My API Documentation

- +
@@ -65,7 +56,7 @@

Read My API Documentation

- +
@@ -74,7 +65,7 @@

Read My API Documentation

- +
@@ -83,7 +74,7 @@

Read My API Documentation

- +
@@ -102,7 +93,7 @@

Read My API Documentation

-

Albums

+

Skatespots

From b04aed7b94f94853f83e9cf8ea2bde3e4151f4de Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 16:08:06 -0700 Subject: [PATCH 07/33] Do the front end yourself --- public/styles/styles.css | 2 +- views/index.html | 115 +-------------------------------------- 2 files changed, 2 insertions(+), 115 deletions(-) diff --git a/public/styles/styles.css b/public/styles/styles.css index 70cf2c13..ee4bc00c 100644 --- a/public/styles/styles.css +++ b/public/styles/styles.css @@ -5,7 +5,7 @@ color: #EEE; } .jumbotron .container { - height: 350px; + height: 250px; } .inline-header { diff --git a/views/index.html b/views/index.html index c93137fc..62a617b0 100644 --- a/views/index.html +++ b/views/index.html @@ -26,119 +26,6 @@

Skatespot.com

-
-
-
- -
-
- - - Add New Skatespot - - -
- -
- - -
-
- - -
- -
- - -
-
- - -
- -
- - -
-
- - -
- -
- -
-
- - - -
- -
- -
-
-
-
-
-
-
- - - - - - -
-
-
-

Skatespots

-
-
- - -
- -
- - - - - + From 66c7f066db2f8b5264fc76b3f8caa5aa94ea43eb Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 16:11:20 -0700 Subject: [PATCH 08/33] Do --- public/styles/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/styles/styles.css b/public/styles/styles.css index ee4bc00c..e0e95e05 100644 --- a/public/styles/styles.css +++ b/public/styles/styles.css @@ -5,11 +5,11 @@ color: #EEE; } .jumbotron .container { - height: 250px; + height: 350px; } .inline-header { display: inline-block; - vertical-align: baseline; + vertical-align: bottom; margin-right: 12px; } From be9a4357ed63385efc3ed1b5dea90d5915cd40b2 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 16:12:56 -0700 Subject: [PATCH 09/33] D --- public/styles/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/styles/styles.css b/public/styles/styles.css index e0e95e05..50b361d2 100644 --- a/public/styles/styles.css +++ b/public/styles/styles.css @@ -5,11 +5,11 @@ color: #EEE; } .jumbotron .container { - height: 350px; + height: 450px; } .inline-header { display: inline-block; - vertical-align: bottom; + vertical-align: baseline; margin-right: 12px; } From 4b1b5b1cf41c134d69fbb356870dccb1d592b65f Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 16:40:58 -0700 Subject: [PATCH 10/33] testD --- views/index.html | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/views/index.html b/views/index.html index 62a617b0..c9d201ca 100644 --- a/views/index.html +++ b/views/index.html @@ -26,6 +26,31 @@

Skatespot.com

- + +
+ +
+ +
+ +
+ + Add New Album + + + + + + + + + +
+
+
+
+ From 59910d04a8b0ac78b8fd941b2aa8e249940e993d Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 16:42:51 -0700 Subject: [PATCH 11/33] testingD --- views/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/index.html b/views/index.html index c9d201ca..34071e43 100644 --- a/views/index.html +++ b/views/index.html @@ -33,11 +33,11 @@

Skatespot.com

-
+
- Add New Album +

Add Skatepark

From 7c4081e7b3240bdc89e8c83221cbff79be11b325 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Fri, 1 Sep 2017 16:44:34 -0700 Subject: [PATCH 12/33] testing2D --- views/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/index.html b/views/index.html index 34071e43..b52a9cd2 100644 --- a/views/index.html +++ b/views/index.html @@ -37,7 +37,7 @@

Skatespot.com

-

Add Skatepark

+ Add A Skatepark From 3c17d2d672f6a318e747a6ceb96df54d66be6267 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Mon, 4 Sep 2017 22:00:58 -0700 Subject: [PATCH 13/33] tesD --- public/styles/styles.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/styles/styles.css b/public/styles/styles.css index 50b361d2..a1e7d7a6 100644 --- a/public/styles/styles.css +++ b/public/styles/styles.css @@ -13,3 +13,6 @@ vertical-align: baseline; margin-right: 12px; } +legend { + text: bold; +} From 31b23fdf3d244bbd7629c8cae98eeaa06dc5ec58 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Mon, 4 Sep 2017 22:07:52 -0700 Subject: [PATCH 14/33] form --- views/index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/views/index.html b/views/index.html index b52a9cd2..d67a601a 100644 --- a/views/index.html +++ b/views/index.html @@ -35,11 +35,17 @@

Skatespot.com

it centers it, leaving one column empty on both sides -->
- + Add A Skatepark - - + +
+ +
+ + +
+
From cf9123ccf3ddbcd356fafaff03657b0603a18a19 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Mon, 4 Sep 2017 22:09:37 -0700 Subject: [PATCH 15/33] form --- views/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/index.html b/views/index.html index d67a601a..579efc6b 100644 --- a/views/index.html +++ b/views/index.html @@ -40,8 +40,8 @@

Skatespot.com

Add A Skatepark
- -
+ +
From 3ddc4006574cdc7998ed82af91d792e82055d9fb Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Mon, 4 Sep 2017 22:11:29 -0700 Subject: [PATCH 16/33] for --- views/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/index.html b/views/index.html index 579efc6b..0d6012e0 100644 --- a/views/index.html +++ b/views/index.html @@ -40,7 +40,8 @@

Skatespot.com

Add A Skatepark
- +
From 43497584564ad514392bb315748973b979a6f786 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Mon, 4 Sep 2017 22:34:34 -0700 Subject: [PATCH 17/33] html --- views/index.html | 49 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/views/index.html b/views/index.html index 0d6012e0..ad278420 100644 --- a/views/index.html +++ b/views/index.html @@ -34,30 +34,51 @@

Skatespot.com

and starts the div one over from the left, since there are 10 it centers it, leaving one column empty on both sides -->
- - Add A Skatepark + Add A Skatespot +
+ +
+ +
+
+
- +
- - +
- - - - - - - + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+
- + From 5d83663d5aa5ee70d78aa4320f14cb4ba2cc0cc9 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Mon, 4 Sep 2017 22:38:32 -0700 Subject: [PATCH 18/33] html2 --- public/styles/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/styles/styles.css b/public/styles/styles.css index a1e7d7a6..f9123502 100644 --- a/public/styles/styles.css +++ b/public/styles/styles.css @@ -9,7 +9,7 @@ } .inline-header { - display: inline-block; + display: center; vertical-align: baseline; margin-right: 12px; } From 519a6c50ed6ee0b52ce5b1fd2ed93428fa06d810 Mon Sep 17 00:00:00 2001 From: deathofasellout Date: Mon, 4 Sep 2017 22:50:28 -0700 Subject: [PATCH 19/33] html3 --- views/index.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/views/index.html b/views/index.html index ad278420..cfefcf37 100644 --- a/views/index.html +++ b/views/index.html @@ -39,38 +39,38 @@

Skatespot.com

Add A Skatespot
-