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 67b8cbe

Browse files
2 parents ac2918a + 4bb9101 commit 67b8cbe

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed
File renamed without changes.

‎api/dist/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html><head><meta charset=utf-8><link src=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css><link type=text/css rel=stylesheet href=//unpkg.com/bootstrap@next/dist/css/bootstrap.min.css><link type=text/css rel=stylesheet href=//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css><script src=https://code.jquery.com/jquery-3.2.1.js integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin=anonymous></script><script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js></script><meta name=viewport content="width=device-width,initial-scale=1"><title>projectvue</title><link href=/static/css/app.3645b232c3f0d2290d9b545fe1dfbd87.css rel=stylesheet></head><body style=background-color:#007bff><div id=app></div><script src=//unpkg.com/babel-polyfill@latest/dist/polyfill.min.js></script><script src=//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js></script><script type=text/javascript src=/static/js/manifest.14a7bd0d2065353721a9.js></script><script type=text/javascript src=/static/js/vendor.d6fc5614b870bd75d40b.js></script><script type=text/javascript src=/static/js/app.a9af91fe03779167d096.js></script></body></html>
1+
<!DOCTYPE html><html><head><meta charset=utf-8><link src=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css><link type=text/css rel=stylesheet href=//unpkg.com/bootstrap@next/dist/css/bootstrap.min.css><link type=text/css rel=stylesheet href=//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css><script src=https://code.jquery.com/jquery-3.2.1.js integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin=anonymous></script><script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js></script><meta name=viewport content="width=device-width,initial-scale=1"><title>projectvue</title><link href=/Auth_vuejs/static/css/app.3645b232c3f0d2290d9b545fe1dfbd87.css rel=stylesheet></head><body style=background-color:#007bff><div id=app></div><script src=//unpkg.com/babel-polyfill@latest/dist/polyfill.min.js></script><script src=//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js></script><script type=text/javascript src=/Auth_vuejs/static/js/manifest.14a7bd0d2065353721a9.js></script><script type=text/javascript src=/Auth_vuejs/static/js/vendor.d6fc5614b870bd75d40b.js></script><script type=text/javascript src=/Auth_vuejs/static/js/app.a9af91fe03779167d096.js></script></body></html>

‎api/server.js‎

Lines changed: 7 additions & 4 deletions
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,10 +19,9 @@ 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-
app.get('/*', function(req, res){
23-
res.sendFile('/dist/index.html' ,{root:__dirname});
24-
});
22+
23+
app.use(express.static(path.join(__dirname, 'dist')))
24+
2525
router.route('/register/')
2626
.post(function(req, res) {
2727
var login = new Login();
@@ -101,4 +101,7 @@ router.route('/result')
101101
});
102102

103103
app.use('/api',router);
104+
app.get('/*', function(req, res){
105+
res.sendFile('/dist/index.html' ,{root:__dirname});
106+
});
104107
app.listen(port);

0 commit comments

Comments
(0)

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