Skip to content

Commit 37714b8

Browse files
committed
Added css public directory and app middleware
1 parent 4d8ec59 commit 37714b8

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

public/css/app.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
html, *
2+
{
3+
margin: 0;
4+
}
5+
6+
body {
7+
background: #222;
8+
color: #eee;
9+
}

server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var server = new Server('localhost', 27017);
99
var db = new Db('nodelabs-users', server, { safe: true });
1010

1111
app.engine('jade', require('jade').__express);
12+
app.use(express.static('public'));
1213

1314
require('./routes/index.js')(app, db);
1415

views/layout.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ doctype html
22
html(lang="en")
33
head
44
title= pageTitle
5+
link(href="/css/app.css" rel="stylesheet")
56
body
67
h1 Users
78
block content

0 commit comments

Comments
 (0)