Skip to content

Commit

Permalink
add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredo003 committed Nov 29, 2024
1 parent 786fcaf commit 00752e6
Show file tree
Hide file tree
Showing 9 changed files with 2,358 additions and 1,731 deletions.
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM node:latest

WORKDIR /usr/app

COPY package.json ./

RUN npm install

COPY . .

EXPOSE 2000

FROM node:latest

WORKDIR /usr/app

COPY package.json ./

RUN npm install

COPY . .

EXPOSE 2000

CMD ["npm","run","dev"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# x-tasks
Task Management Tool
# x-tasks
Task Management Tool
52 changes: 26 additions & 26 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
version: '3.9'

services:
xtasks_db:
image: postgres
container_name: xtasks_db
restart: always
ports:
- 5432:5432
environment:
- POSTGRES_USER=alfredo
- POSTGRES_PASSWORD=alfredo03
- POSTGRES_DB=xtasks_db
volumes:
- pgdata:/data/postgres
network_mode: host
app:
build: .
container_name: xtasks
ports:
- 2000:2000
volumes:
- .:/usr/app

volumes:
pgdata:
version: '3.9'

services:
xtasks_db:
image: postgres
container_name: xtasks_db
restart: always
ports:
- 5432:5432
environment:
- POSTGRES_USER=alfredo
- POSTGRES_PASSWORD=alfredo03
- POSTGRES_DB=xtasks_db
volumes:
- pgdata:/data/postgres
network_mode: host
app:
build: .
container_name: xtasks
ports:
- 2000:2000
volumes:
- .:/usr/app

volumes:
pgdata:
driver: local
13 changes: 13 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";


/** @type {import('eslint').Linter.Config[]} */
export default [
{files: ["**/*.{js,mjs,cjs,ts}"]},
{files: ["**/*.js"], languageOptions: {sourceType: "script"}},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
48 changes: 26 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{
"name": "x-tasks",
"version": "1.0.0",
"main": "index.js",
"repository": "[email protected]:alfredo003/x-tasks.git",
"author": "alfredo chivela <[email protected]>",
"license": "MIT",
"scripts": {
"dev": "ts-node-dev --inspect --transpile-only --ignore-watch node_modules --respawn ./src/server.ts"
},
"dependencies": {
"express": "^4.21.1",
"pg": "^8.13.1",
"reflect-metadata": "^0.2.2",
"typeorm": "^0.3.20"
},
"devDependencies": {
"@types/express": "^5.0.0",
"ts-node-dev": "^2.0.0",
"typescript": "^5.7.2"
}
}
{
"name": "x-tasks",
"version": "1.0.0",
"main": "index.js",
"repository": "[email protected]:alfredo003/x-tasks.git",
"author": "alfredo chivela <[email protected]>",
"license": "MIT",
"scripts": {
"dev": "ts-node-dev --inspect --transpile-only --ignore-watch node_modules --respawn ./src/server.ts"
},
"dependencies": {
"express": "^4.21.1",
"pg": "^8.13.1",
"reflect-metadata": "^0.2.2",
"typeorm": "^0.3.20"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@types/express": "^5.0.0",
"eslint": "^9.16.0",
"globals": "^15.12.0",
"ts-node-dev": "^2.0.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0"
}
}
Empty file added src/database/data-source.ts
Empty file.
18 changes: 9 additions & 9 deletions src/server.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import express from "express";

const app = express();

app.get("/", (req, res) => {
res.status(200).json({ message: "Hello!" });
});

app.listen(2000,()=>console.log("Running Ok!"));
import express from "express";

const app = express();

app.get("/", (req, res) => {
res.status(200).json({ message: "Hello!" });
});

app.listen(2000,()=>console.log("Running Ok!"));
222 changes: 111 additions & 111 deletions tsconfig.json

Large diffs are not rendered by default.

Loading

0 comments on commit 00752e6

Please sign in to comment.