mirror of
https://dev.s-ul.net/Galexion/MaiMaiDXNet.git
synced 2024-11-30 20:54:31 +01:00
.
This commit is contained in:
parent
025a78d824
commit
6e63285a82
6
index.js
6
index.js
@ -34,7 +34,7 @@ if (config.serverType === 0) { // Only run the image Importer when Aqua is activ
|
|||||||
.on('error', (error) => {
|
.on('error', (error) => {
|
||||||
console.error(`Watcher error: ${error}`);
|
console.error(`Watcher error: ${error}`);
|
||||||
});
|
});
|
||||||
} else if (config.ArtImageDirectory){
|
} else if (config.ArtImageDirectory && config.ArtImageImport === true){
|
||||||
const watcher = chokidar.watch(config.ArtImageDirectory, {
|
const watcher = chokidar.watch(config.ArtImageDirectory, {
|
||||||
persistent: true
|
persistent: true
|
||||||
});
|
});
|
||||||
@ -59,6 +59,8 @@ if (config.serverType === 0) { // Only run the image Importer when Aqua is activ
|
|||||||
.on('error', (error) => {
|
.on('error', (error) => {
|
||||||
console.error(`Watcher error: ${error}`);
|
console.error(`Watcher error: ${error}`);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
console.log("Image Export Disabled. Check readme.md for details.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// readFileSync function must use __dirname get current directory
|
// readFileSync function must use __dirname get current directory
|
||||||
@ -89,7 +91,7 @@ app.use(function (req, res, next) {
|
|||||||
next(createError(404));
|
next(createError(404));
|
||||||
});
|
});
|
||||||
|
|
||||||
var PORT = process.env.PORT || 8000
|
var PORT = config.hostPort || 8000
|
||||||
|
|
||||||
// error handler
|
// error handler
|
||||||
app.use(function (err, req, res, next) {
|
app.use(function (err, req, res, next) {
|
||||||
|
Loading…
Reference in New Issue
Block a user