Skip to content

Commit

Permalink
change task "start" in deno.json
Browse files Browse the repository at this point in the history
- changes in workspace and readme
  • Loading branch information
EdixonAlberto committed Mar 7, 2023
1 parent cc2998e commit e38614f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 61 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# FOLDERS
.husky/
.vscode/
.vscode/*
!.vscode/extensions

# FILES
.env*
Expand Down
70 changes: 25 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,51 +30,31 @@ cp .env.template .env
| GET | /api/jobs | Obtener todas las ofertas de trabajo |
| GET | /api/docs | Página de documentación de la api (Proximamente) |

Ejemplo de respuesta para `GET: /api/jobs`

```json
{
"total": 346,
"jobs": [
{
"title": "Desarrollador/a Back-end Microservicios",
"role": "Semi Senior",
"time": "Full time",
"postulationFast": true,
"companyName": "Empresas SB",
"location": "Santiago (hybrid)",
"url": "https://www.getonbrd.com/jobs/programming/desarrollador-a-backend-empresas-sb-santiago",
"perks": [
"accessible",
"meals provided",
"bicycle parking",
"commuting buses",
"free car parking",
"computer provided",
"education stipend",
"informal dresscode"
],
"isNew": true,
"hasPublishedSalary": true,
"details": {
"postulations": 127,
"remote100": false,
"language": "spanish",
"skills": [
"Agile",
"Back-end",
"Docker",
"Java",
"Microservices",
"Oracle",
"Software Analyst",
"Spring Boot",
"Virtualization"
]
}
},
{ ... }
]
Declaración de tipos de la respuesta entregada por el endpoint `GET: /api/jobs`

```ts
type TResponseList = {
total: number
data: TJob[]
}

type TJob = {
title: string
role: string
time: string
postulationFast: boolean
companyName: string
location: string
url: string
perks: string[]
isNew: boolean
hasPublishedSalary: boolean
details: {
postulations: number
remote100: boolean
language: string | 'spanish'
skills: string[]
}
}
```
Expand Down
9 changes: 2 additions & 7 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"tasks": {
"dev": "deno run --allow-env --allow-read --allow-net --watch src/main.ts",
"start": "deno run --allow-env --allow-read --allow-net src/main.ts",
"start": "deno task prepare:db && deno run --allow-env --allow-read --allow-net src/main.ts",
"prepare:db": "deno run --allow-env --allow-read --allow-net --allow-write ./src/scraping/jobs.ts",
"update:lock": "deno cache --lock=deno.lock --lock-write ./deps.ts",
"prepare:husky": "deno run --allow-env --allow-read --allow-write --allow-run ./tools/prepare-husky.ts",
Expand All @@ -15,12 +15,7 @@
},
"fmt": {
"files": {
"include": [
"src/",
"test/",
"demo/",
"deps.ts"
]
"include": ["src/", "test/", "demo/", "deps.ts"]
},
"options": {
"useTabs": true,
Expand Down
11 changes: 3 additions & 8 deletions jobs-dev.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
"deno.config": "./deno.json",
"deno.lint": true,
"deno.importMap": "./import_map.json",
"deno.enablePaths": ["."],
"editor.formatOnSave": true,
"[typescriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
Expand All @@ -38,13 +39,7 @@
"thunder-client.saveToWorkspace": true
},
"extensions": {
"recommendations": [
"denoland.vscode-deno",
"rangav.vscode-thunder-client",
"dzannotti.vscode-babel-coloring",
"jabacchetta.javascript-snippets",
"esbenp.prettier-vscode"
]
"recommendations": ["rangav.vscode-thunder-client", "irongeek.vscode-env", "esbenp.prettier-vscode"]
},
"launch": {
"version": "0.2.0",
Expand Down

0 comments on commit e38614f

Please sign in to comment.