Skip to content

Commit

Permalink
[#117894487] Adds Materialize and public folder
Browse files Browse the repository at this point in the history
  • Loading branch information
andela-gnyenyeshi committed Apr 21, 2016
1 parent 85edadb commit 8157950
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
11 changes: 10 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
3 changes: 3 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nav .brand-logo {
left: 3%;
}
20 changes: 20 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/js/materialize.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">
<link rel="stylesheet" href="css/style.css">
<title>Tech In Pink</title>
</head>
<body>
<nav>
<div class="nav-wrapper">
<a href="#" class="brand-logo">tech in pink</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a href="sass.html">Sass</a></li>
</ul>
</div>
</nav>
</body>
</html>

0 comments on commit 8157950

Please sign in to comment.