From 8157950aa0e6f185e6eeb2c55a029aacc4375657 Mon Sep 17 00:00:00 2001 From: andela-gnyenyeshi Date: Thu, 21 Apr 2016 14:17:21 +0300 Subject: [PATCH] [#117894487] Adds Materialize and public folder --- app.js | 11 ++++++++++- package.json | 3 ++- public/css/style.css | 3 +++ public/index.html | 20 ++++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 public/css/style.css create mode 100644 public/index.html diff --git a/app.js b/app.js index 8b7bf4d..bf324fe 100644 --- a/app.js +++ b/app.js @@ -17,7 +17,10 @@ port = 3030, // Require the config file - config = require('./config/config'); + config = require('./config/config'), + + //Dependency to help with path + path = require('path'); // Connect to the database mongoose.connect(config.db, function(err) { @@ -28,6 +31,12 @@ } }); + app.get('/', function(req, res) { + // Deliver html file + res.sendFile(path.join(__dirname + '/public/index.html')); + app.use(express.static(__dirname + '/public')); + }); + // Start up the server app.listen(port, function(err) { if (err) { diff --git a/package.json b/package.json index e804af5..312af23 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "homepage": "https://github.com/andela-gnyenyeshi/techinpink#readme", "dependencies": { "express": "^4.13.4", - "mongoose": "^4.4.12" + "mongoose": "^4.4.12", + "path": "^0.12.7" } } diff --git a/public/css/style.css b/public/css/style.css new file mode 100644 index 0000000..ab4f531 --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,3 @@ +nav .brand-logo { + left: 3%; +} diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..945a9ae --- /dev/null +++ b/public/index.html @@ -0,0 +1,20 @@ + + + + + + + + Tech In Pink + + + + +