Skip to content

Commit fb392da

Browse files
committed
更新
1 parent 70fa7d8 commit fb392da

File tree

113 files changed

+189
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+189
-17
lines changed

README.md

Lines changed: 179 additions & 3 deletions

myapp/app.js renamed to express/app.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,12 @@ app.all('*', function(req, res, next) {
1616
res.header("Access-Control-Allow-Origin", "*");
1717
res.header('Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS');
1818
res.header("Access-Control-Allow-Headers", "Content-Type, access_token, X-Requested-With")
19-
// res.header("Content-Type", "application/json;charset=utf-8");
20-
console.log(req.originalUrl,'11111')
2119
if(rouetpass.indexOf(req.originalUrl) > -1 || req.originalUrl.split('/').indexOf('static') > -1){
22-
2320
next()
2421
}else{
2522
if (req.method != "OPTIONS"){
2623
var accesstoken = req.headers['access_token'];
2724
let datatoken = token.decodeToken(accesstoken)
28-
// console.log(data)
2925
if(datatoken.flag){
3026
next()
3127
}else{
@@ -37,20 +33,20 @@ app.all('*', function(req, res, next) {
3733
}
3834
}
3935
});
40-
app.set('views', path.join(__dirname, 'views'));
41-
app.set('view engine', 'jade');
36+
// app.set('views', path.join(__dirname, 'views'));
37+
// app.set('view engine', 'jade');
4238

4339
app.use(logger('dev'));
4440
app.use(express.json());
4541
app.use(express.urlencoded({ extended: false }));
4642
app.use(cookieParser());
4743
app.use(express.static(path.join(__dirname, 'public')));
48-
// app.get('/*', function (req, res) {
49-
// res.sendFile(path.resolve(__dirname, 'public',"index.html"));
50-
// });
44+
app.get('/', function (req, res) {
45+
res.sendFile(path.resolve(__dirname, 'public',"index.html"));
46+
});
5147

5248

53-
app.use('/', indexRouter);
49+
// app.use('/', indexRouter);
5450
app.use('/users', usersRouter);
5551
app.use('/table', tableRouter);
5652
// catch 404 and forward to error handler
File renamed without changes.

myapp/config/db.js renamed to express/config/db.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
var mysql = require("mysql");
22
var connection = mysql.createConnection({
3-
host:"",
3+
host:"59.110.164.162",
44
port: 3306,
5-
user:"",
6-
password:"",
7-
database:"",
5+
user:"root",
6+
password:"449a18c7ab3950ae",
7+
database:"test",
88
useConnectionPooling: true
99
});
1010

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)