update
This commit is contained in:
parent
c77bf01a08
commit
14d976a12d
|
|
@ -1,11 +1,15 @@
|
|||
// invoked in worker
|
||||
const { execSync } = require('child_process');
|
||||
const os = require("os");
|
||||
think.beforeStartServer(async () => {
|
||||
if (os.platform().startsWith("linux")) {
|
||||
try {
|
||||
execSync('service mysql start', { stdio: ['inherit', 'inherit', 'inherit'] });
|
||||
} catch (error) {
|
||||
console.log("beforeStartServer", error);
|
||||
}
|
||||
}
|
||||
|
||||
const username = 'test';
|
||||
let user = await think.model("users").where({ username }).find();
|
||||
if (think.isEmpty(user)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue