Skip to content

Commit

Permalink
Fix default index
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Nov 16, 2014
1 parent b3b7a0c commit 2e3d833
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = function(object, filename) {
if (fs.existsSync(process.cwd() + '/public')) {
server.use(serveStatic(process.cwd() + '/public'));
} else {
server.use(serveStatic(path.join(__dirname, './public')));
server.use(serveStatic(__dirname + '/public'));
}

server.use(cors({ origin: true, credentials: true }))
Expand All @@ -66,4 +66,4 @@ module.exports = function(object, filename) {
}

return server
}
}
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe('Server', function() {
it('should respond with html', function(done) {
request(server)
.get('/')
.expect('Content-Type', /html/)
.expect(/You're successfully running JSON Server/)
.expect(200, done);
});
});
Expand Down

0 comments on commit 2e3d833

Please sign in to comment.