Skip to content

Commit

Permalink
fix(js): remove semicolons from generated app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
php-coder committed Jul 7, 2023
1 parent 8aa0c0c commit 6dfd934
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions examples/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ const pool = mysql.createPool({
// Support of named placeholders (https://github.com/mysqljs/mysql#custom-format)
queryFormat: function(query, values) {
if (!values) {
return query;
return query
}
return query.replace(/\:(\w+)/g, function(txt, key) {
if (values.hasOwnProperty(key)) {
return this.escape(values[key]);
return this.escape(values[key])
}
return txt;
}.bind(this));
return txt
}.bind(this))
}
})

routes.register(app, pool)

const port = process.env.PORT || 3000;
const port = process.env.PORT || 3000
app.listen(port, () => {
console.log(`Listen on ${port}`)
})
10 changes: 5 additions & 5 deletions src/templates/app.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ const pool = mysql.createPool({
// Support of named placeholders (https://github.com/mysqljs/mysql#custom-format)
queryFormat: function(query, values) {
if (!values) {
return query;
return query
}
return query.replace(/\:(\w+)/g, function(txt, key) {
if (values.hasOwnProperty(key)) {
return this.escape(values[key]);
return this.escape(values[key])
}
return txt;
}.bind(this));
return txt
}.bind(this))
}
})

routes.register(app, pool)

const port = process.env.PORT || 3000;
const port = process.env.PORT || 3000
app.listen(port, () => {
console.log(`Listen on ${port}`)
})

0 comments on commit 6dfd934

Please sign in to comment.