Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e2661f5

Browse files
fixed path
1 parent 7cb7e85 commit e2661f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎api/server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var express = require('express');
22
var jwt = require('jsonwebtoken');
3+
var path = require('path')
34
var app = express();
45
var mongoose = require('mongoose');
56
mongoose.connect('mongodb://localhost:27017/loginapi',{ useMongoClient: true});
@@ -18,7 +19,8 @@ app.set('superSecret',config.secret);
1819
var port = process.env.PORT || 3003;
1920

2021
var router = express.Router();
21-
app.use(express.static('dist'));
22+
23+
app.use('/', express.static(path.join(__dirname, 'dist')))
2224

2325
router.route('/register/')
2426
.post(function(req, res) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /