use bun
This commit is contained in:
20
.eslintrc.json
Normal file
20
.eslintrc.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es2021": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": "latest",
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
{
|
{
|
||||||
"tabWidth": 2,
|
"tabWidth": 1,
|
||||||
"useTabs": true,
|
"useTabs": true
|
||||||
"printWidth": 100
|
|
||||||
}
|
}
|
||||||
|
|
||||||
11
dockerfile
11
dockerfile
@@ -1,5 +1,5 @@
|
|||||||
# Use Node 16 alpine as parent image
|
# Use oven/bun as parent image
|
||||||
FROM node:16-alpine
|
FROM oven/bun:latest
|
||||||
|
|
||||||
# Change the working directory on the Docker image to /app
|
# Change the working directory on the Docker image to /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -8,11 +8,10 @@ WORKDIR /app
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install
|
RUN bun install
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# Expose application port
|
# Expose application port
|
||||||
# EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Start the application
|
# Start the application
|
||||||
CMD npm start
|
CMD bun start
|
||||||
2166
package-lock.json
generated
2166
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
@@ -1,33 +1,34 @@
|
|||||||
{
|
{
|
||||||
"name": "scheduled",
|
"name": "scheduled",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"main": "app.js",
|
"main": "src/app.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node dist/app.js",
|
"start": "bun src/app.ts",
|
||||||
"dev": "nodemon app.ts",
|
"dev": "nodemon app.ts",
|
||||||
"build": "tsc --build",
|
"build": "tsc --build"
|
||||||
"deploy:dev": "npm start --develop",
|
|
||||||
"deploy:testing": "npm start --testing",
|
|
||||||
"deploy:production": "npm start --production"
|
|
||||||
},
|
},
|
||||||
"author": "Fran Jurmanović <fjurma12@outlook.com>",
|
"author": "Fran Jurmanović <fjurma12@outlook.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "^14.14.31",
|
"@types/node": "^14.14.31",
|
||||||
"axios": "^0.26.0",
|
"axios": "^0.26.0",
|
||||||
|
"body-parser": "^1.20.2",
|
||||||
"cheerio": "^1.0.0-rc.10",
|
"cheerio": "^1.0.0-rc.10",
|
||||||
|
"cron": "^3.0.0",
|
||||||
"discord.js": "^12.5.1",
|
"discord.js": "^12.5.1",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"node-cron": "^3.0.0",
|
"express": "^4.18.2",
|
||||||
"pg": "^8.5.1",
|
"express-basic-auth": "^1.2.1",
|
||||||
"puppeteer": "^13.5.1",
|
|
||||||
"ts-node": "^9.1.1",
|
|
||||||
"typescript": "^4.1.5"
|
"typescript": "^4.1.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/express": "^4.17.18",
|
||||||
"@types/node-cron": "^3.0.1",
|
"@types/node-cron": "^3.0.1",
|
||||||
"@types/pg": "^7.14.10",
|
"@types/pg": "^7.14.10",
|
||||||
"@types/ws": "^7.4.0",
|
"@types/ws": "^7.4.0",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
||||||
|
"@typescript-eslint/parser": "^6.7.4",
|
||||||
|
"eslint": "^8.50.0",
|
||||||
"prettier": "^2.2.1"
|
"prettier": "^2.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,16 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
}
|
"esModuleInterop": true,
|
||||||
|
"baseUrl": "./src/",
|
||||||
|
"paths": {
|
||||||
|
"@common": ["common"],
|
||||||
|
"@constants": ["constants"],
|
||||||
|
"@controllers": ["controllers"],
|
||||||
|
"@core": ["core"],
|
||||||
|
"@modules": ["modules"],
|
||||||
|
"@models": ["models"],
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user