diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index d08e1e6..0000000 --- a/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# http://editorconfig.org -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/.env b/.env deleted file mode 100644 index e69de29..0000000 diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..9b79acf --- /dev/null +++ b/.env.test @@ -0,0 +1 @@ +DB_NAME=blog_test \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 093f86e..0000000 --- a/.eslintrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "env": { - "node": true, - "es6": true, - "mocha": true - }, - "parserOptions": { - "ecmaVersion": 2017 - }, - "extends": "eslint:recommended", - "rules": { - "comma-spacing": ["error", { "before": false, "after": true }], - "indent": ["error", 2], - "linebreak-style": ["error", "unix"], - "quotes": ["error", "single"], - "semi": ["error", "always"] - } -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..0a2fc31 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "prettier"], + "plugins": ["node", "jest", "prettier", "@typescript-eslint"], + "parserOptions": { + "ecmaVersion": 11 + }, + "rules": { + "@typescript-eslint/no-namespace": 0, + "@typescript-eslint/no-explicit-any": 0, + "max-len": [ + "error", + { + "code": 120 + } + ] + } +} diff --git a/.gitignore b/.gitignore index ea4e6a1..c618d7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,7 @@ -# Logs -*.log - -# Node node_modules/ - -# Project specific -config/database.js - -# Unit test / coverage reports -coverage/ -.nyc_output - -# OS auto-generated files -.DS_Store -._* - - -# Vim -*~ -*.swp -*.swo - -# IDE files +dist/ +.index/ +*.log .idea/ +.vscode/ +coverage/ \ No newline at end of file diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 93c8dda..0000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -7.6.0 diff --git a/.nycrc b/.nycrc deleted file mode 100644 index 081beb4..0000000 --- a/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "cwd": "./src", - "exclude": [ - "container.js", - "app/Application.js", - "interfaces/http" - ], - "reporter": [ - "html", - "lcov", - "text-summary" - ] -} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..5d0c691 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "arrowParens": "always", + "printWidth": 120, + "semi": true, + "singleQuote": true +} diff --git a/.sequelizerc b/.sequelizerc deleted file mode 100644 index 555a216..0000000 --- a/.sequelizerc +++ /dev/null @@ -1,8 +0,0 @@ -const ENV = process.env.NODE_ENV || 'development'; - -module.exports = { - config: 'config/database.js', - 'migrations-path': 'src/infra/database/migrate', - 'models-path': 'src/infra/database/models', - 'seeders-path': 'src/infra/database/seeds' -}; diff --git a/LICENSE.md b/LICENSE.md index af75ca9..a6d9701 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2018 Talysson de Oliveira Cassiano +Copyright (c) 2021 Talysson de Oliveira Cassiano, Bruno Henrique de Castro Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Procfile b/Procfile deleted file mode 100644 index 063b78f..0000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: npm start diff --git a/README.md b/README.md index 1a36c1d..3369d39 100644 --- a/README.md +++ b/README.md @@ -1,114 +1,155 @@ -# Node API boilerplate - -An opinionated boilerplate for Node web APIs focused on separation of concerns and scalability. - -## Features - -