Maj packages

This commit is contained in:
Angels-dev
2024-08-03 18:50:04 +02:00
parent f7917f773e
commit 521d530dbd
6 changed files with 20 additions and 42 deletions

3
.vscode/settings.json vendored Executable file
View File

@@ -0,0 +1,3 @@
{
"docker.commands.build": "${containerCommand} build --rm -f \"${dockerfile}\" -t bot_laytho:latest \"${context}\""
}

28
.vscode/tasks.json vendored
View File

@@ -1,28 +0,0 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "docker-build",
"label": "Build Node Image",
"platform": "node",
"dockerBuild": {
"dockerfile": "${workspaceFolder}/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
}
},
{
"type": "docker-run",
"label": "Run Node Image",
"platform": "node",
"dockerRun": {
"containerName": "BotTwitch-Laytho",
"restart": "always",
"network": "host"
},
"dependsOn": [
"docker-build"
]
}
]
}

View File

@@ -1,10 +1,14 @@
FROM node:latest
FROM node:alpine as base
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
RUN npm install --production --verbose && mv node_modules ../
COPY . .
RUN chown -R node /usr/src/app
USER node
EXPOSE 3000
CMD ["npm", "start"]

18
package.json Normal file → Executable file
View File

@@ -1,6 +1,6 @@
{
"name": "bot_laytho",
"version": "1.0.0",
"version": "1.1.0",
"description": "bot_Laytho",
"main": "app.js",
"scripts": {
@@ -12,17 +12,17 @@
"name": "Angels / Jojo"
},
"devDependencies": {
"eslint": "^8.40.0",
"nodemon": "^2.0.22",
"prettier": "^2.8.8"
"eslint": "^9.8.0",
"nodemon": "^3.1.4",
"prettier": "^3.3.3"
},
"eslintConfig": {},
"dependencies": {
"axios": "^1.4.0",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"mysql2": "^3.3.0",
"axios": "^1.7.3",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"mysql2": "^3.11.0",
"require-all": "^3.0.0",
"websocket": "^1.0.34"
"websocket": "^1.0.35"
}
}

1
utils/oauthGen.js Normal file → Executable file
View File

@@ -1,5 +1,4 @@
module.exports = oauthGen = (async (client_id, redirect_uri, scope) => {
console.log(scope)
let queries = {
response_type: 'code',
client_id,

View File

@@ -7,5 +7,5 @@ module.exports = validateToken = (async (access_token) => {
}
}).then(response => {
return true
}).catch(error => { console.error(error.response.data) })
}).catch(error => { if (error.response.data.message == 'invalid access token') console.error(error.response.data) })
})