Skip to content

Commit 2e3d833

Browse files
committed
Fix default index
1 parent b3b7a0c commit 2e3d833

File tree

6 files changed

+3
-3
lines changed

6 files changed

+3
-3
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function(object, filename) {
4141
if (fs.existsSync(process.cwd() + '/public')) {
4242
server.use(serveStatic(process.cwd() + '/public'));
4343
} else {
44-
server.use(serveStatic(path.join(__dirname, './public')));
44+
server.use(serveStatic(__dirname + '/public'));
4545
}
4646

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

6868
return server
69-
}
69+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ describe('Server', function() {
253253
it('should respond with html', function(done) {
254254
request(server)
255255
.get('/')
256-
.expect('Content-Type', /html/)
256+
.expect(/You're successfully running JSON Server/)
257257
.expect(200, done);
258258
});
259259
});

0 commit comments

Comments
 (0)