Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment Michele Motterle #5

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
9 changes: 9 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# LOG
MAX_DAYS_SAVED = 30
LOG_FORMAT = dev
LOG_DIR = ../logs

# COCKTAIL BAR
COCKTAIL_BASE_URL = "https://www.thecocktaildb.com/api/json/v1/1"

PORT=3000
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
23 changes: 23 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"plugins": ["import", "unused-imports"],
"parser": "@typescript-eslint/parser",
"extends": ["prettier", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"import/order": ["error", { "newlines-between": "always", "alphabetize": { "order": "asc" } }],
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-parameter-properties": 0,
"@typescript-eslint/interface-name-prefix": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/consistent-type-imports": "error"
}
}

32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Config Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Perform linting checks
run: npm run lint

- name: Run tests
run: npm test
21 changes: 19 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
.DS_store
.idea
# MacOS DSStore
.DS_Store

# Dependency directories
node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Build
/dist

.idea
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 150,
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "all",
"semi": true,
"arrowParens": "avoid"
}
13 changes: 13 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"watch": [
"src",
".env",
"docs/swagger.yaml"
],
"ext": "js,ts,json",
"ignore": [
"src/logs/*",
"src/**/*.{spec,test}.ts"
],
"exec": "ts-node -r tsconfig-paths/register --transpile-only src/server.ts"
}
Loading