Browse Source

Use Node.js 7 native async/await instead of babel

pull/6/head
Menci 8 years ago
parent
commit
6ff3e571e7
  1. 4
      app.js
  2. 4
      package.json

4
app.js

@ -109,13 +109,11 @@ global.syzoj = {
}).catch((err) => {
this.log(err);
res.locals.user = req.session.user_id = null;
}).finally(() => {
next();
})
} else {
res.locals.user = req.session.user_id = null;
next();
}
next();
});
// Active item on navigator bar

4
package.json

@ -4,7 +4,7 @@
"description": "An OnlineJudge System for OI",
"main": "app.js",
"scripts": {
"start": "babel-node app.js",
"start": "node --harmony-async-await app.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
@ -25,8 +25,6 @@
"dependencies": {
"adm-zip": "^0.4.7",
"ansi-to-html": "^0.4.2",
"babel-cli": "^6.18.0",
"babel-preset-es2017": "^6.16.0",
"body-parser": "^1.15.2",
"cookie-parser": "^1.4.3",
"ejs": "^2.5.2",

Loading…
Cancel
Save