bug fix in backend docker file

This commit is contained in:
Moon Patel
2023-10-13 03:07:39 +05:30
parent e87629f736
commit e28f876b74
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -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
View File
@@ -15,6 +15,6 @@ RUN npm install --silent
COPY . .
# Exports
EXPOSE 5000
EXPOSE 8080
CMD ["npm","start"]
CMD ["node","app.js"]