Esse é um projeto pessoal baseado no material do curso do JStack sobre autenticação. Decidi montar uma pequena API simples de uma aplicativo de lista de tarefas apenas para testar os conhecimentos que desenvolvi assistindo as primeiras lives da plataforma Jstack, desde configurar o linting para o projeto, como arquitetar um projeto desacoplado de framework, criar uma API com typescript que era algo que eu não tinha habilidade até o momento. Estou muito satisfeito com o resultado, passei algumas horinhas enfrentando bugs, porém no final funcionou tudo certo 😅. Pretendo aperfeiçoar ainda mais essa API para finalizar meu primeiro projeto fullstack próprio e continuar evoluíndo sempre!
- Node.JS;
- Express;
- Typescript;
- Yarn
- .env
- Eslint
- Prettier
- Lint-staged
- Commitlinting
- Husky
- EditorConfig
- Prisma
- Sqlite 3
- Json Web Token
- Bcrypt.js
- Insomnia
- Zod => Para verificação de formulários.
Para testar essa API, primeiro baixe os arquivos da API e rode o comando:
npm install
Após isso, crie o arquivo ".env" e adicione as seguintes váriaveis de ambiente:
JWT_SECRET =
"[insira qualquer string para usar como segredo]";
Agora precisamos fazer a migração do nosso banco de dados, então vamos rodar o comando:
npx prisma dev --name gerar_tabelas_inicias
Com isso já deve estar tudo certo para testarmos nosso projeto.
This is a personal project based on the material from the JStack course on authentication. I decided to put together a simple API for a to-do list application just to test the knowledge I developed watching the first live broadcasts of the JStack platform, from setting up linting for the project to architecting a decoupled framework project, creating an API with typescript which was something I didn't have the skill for until now.
I am very satisfied with the result, I spent a few hours dealing with bugs, but in the end everything worked out right 😅. I intend to further improve this API to finalize my first fullstack project of my own and continue to evolve always!
- Node.JS;
- Express;
- Typescript;
- Yarn
- .env
- Eslint
- Prettier
- Lint-staged
- Commitlinting
- Husky
- EditorConfig
- Prisma
- Sqlite 3
- Json Web Token
- Bcrypt.js
- Insomnia
- Zod => forms verification.
To test this API, first download the API files and run the command:
npm install
After that, create the ".env" file and add the following environment variables:
JWT_SECRET = "[secret]";
Now we need to configure our database, so let's run the command:
npx prisma dev --name add_initial_tables
With that, everything should be ready to test our project.