Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"outDir": "./build" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
"strict": true /* Enable all strict type-checking options. */,
// "strict": true /* Enable all strict type-checking options. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
"resolveJsonModule": true
Expand Down
5 changes: 5 additions & 0 deletions semana23/desafio-pokemon-go-redfox/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
build
.env
.vscode
pokemonGo.xlsx
23 changes: 23 additions & 0 deletions semana23/desafio-pokemon-go-redfox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Case Back end

url: https://pokemon-case.herokuapp.com/
documentation: https://documenter.getpostman.com/view/14555245/UUxwDpfS

**Sobre**
Api que busca dados dos pokemon.


**Recursos utilizados**
- Nodejs;
- MySQL;
- express;
- typescript;
- uuid;
- knex;


**O que contém:**
- Endpoint Get All Pokemon: que busca todos os pokemon, mostrando um limite de 15 por página;
- Endpoint Get Pokemon By Id: pesquisa por id;
- Endpoint Get Pokemon By Filter By Order By Page: pesquisa palavras no name ou type. Ordena por pelo statTotal, atk, def, sta, cp40 ou cp39, de forma crescente ou decrescente.

22 changes: 22 additions & 0 deletions semana23/desafio-pokemon-go-redfox/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import express, { Request, Response } from "express";
import dotenv from "dotenv";
import { AddressInfo } from "net";



dotenv.config();

export const app = express();

app.use(express.json());

const server = app.listen(process.env.PORT || 3003, () => {
if (server) {
const address = server.address() as AddressInfo;
console.log(`Server is running in http://localhost:${address.port}`);
} else {
console.error(`Failure upon starting server.`);
}
});

export default app;
24 changes: 24 additions & 0 deletions semana23/desafio-pokemon-go-redfox/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
roots: ["<rootDir>/tests"],
transform: {
"^.+\\.tsx?$": "ts-jest",
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
};

// // jest.config.js
// // Sync object
// /** @type {import('@jest/types').Config.InitialOptions} */
// const config = {
// verbose: true,
// };

// module.exports = config;

// // Or async function
// module.exports = async () => {
// return {
// verbose: true,
// };
// };
Loading