bug fix in backend docker file
This commit is contained in:
+5
-1
@@ -1,7 +1,8 @@
|
||||
const path = require("path");
|
||||
const { Engine } = require("node-uci");
|
||||
|
||||
require("dotenv").config();
|
||||
const engine = new Engine(process.env.CHESS_ENGINE_PATH || "./engine/stockfish16.exe");
|
||||
const engine = new Engine(path.join(__dirname, process.env.CHESS_ENGINE_PATH || "engine/stockfish16.exe"));
|
||||
|
||||
engine
|
||||
.init()
|
||||
@@ -10,6 +11,9 @@ engine
|
||||
})
|
||||
.then((eng) => {
|
||||
eng.setoption("UCI_Elo");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
const nextMove = async ({ position }) => {
|
||||
|
||||
+2
-2
@@ -15,6 +15,6 @@ RUN npm install --silent
|
||||
COPY . .
|
||||
|
||||
# Exports
|
||||
EXPOSE 5000
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["npm","start"]
|
||||
CMD ["node","app.js"]
|
||||
Reference in New Issue
Block a user