{"id":20988668,"url":"https://github.com/franciscowallison/nlw-05-nodejs","last_synced_at":"2025-08-08T06:15:29.652Z","repository":{"id":52498621,"uuid":"359637122","full_name":"FranciscoWallison/nlw-05-nodejs","owner":"FranciscoWallison","description":"Projeto desenvolvido durante a 5° edição da NLW na trilha de NODE JS Da Rocketseat .","archived":false,"fork":false,"pushed_at":"2023-09-12T21:34:47.000Z","size":6118,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T04:14:06.787Z","etag":null,"topics":["docker","docker-compose","jenkins","jest","mongodb","mysql","nodejs","postgresql","sonarqube","sqlite3"],"latest_commit_sha":null,"homepage":"https://nlw-05-nodejs.herokuapp.com/pages/client","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FranciscoWallison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-20T00:34:41.000Z","updated_at":"2024-07-10T13:13:34.000Z","dependencies_parsed_at":"2025-04-12T04:24:21.428Z","dependency_job_id":null,"html_url":"https://github.com/FranciscoWallison/nlw-05-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FranciscoWallison/nlw-05-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranciscoWallison%2Fnlw-05-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranciscoWallison%2Fnlw-05-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranciscoWallison%2Fnlw-05-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranciscoWallison%2Fnlw-05-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FranciscoWallison","download_url":"https://codeload.github.com/FranciscoWallison/nlw-05-nodejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranciscoWallison%2Fnlw-05-nodejs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269373398,"owners_count":24406376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","jenkins","jest","mongodb","mysql","nodejs","postgresql","sonarqube","sqlite3"],"created_at":"2024-11-19T06:22:37.649Z","updated_at":"2025-08-08T06:15:29.627Z","avatar_url":"https://github.com/FranciscoWallison.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [NLW#5] Start Project NodeJs e Docker, Docker-Compose, Jenkins, SonarQube Heroku, Sqlit, Mysql, Porstgres, Mongodb,  Testing e CI/CD\n\n\u003cimg src=\"https://github.com/FranciscoWallison/nlw-05-nodejs/blob/master/nodejs/public/images/nlw5-1.jpg\" width=\"900\" /\u003e\n\n  \u003ch1 align=\"center\"\u003e  NPS-API Net Promoter Score  \u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003eProjeto desenvolvido durante a 5° edição da NLW \u003ca href\"https://rocketseat.com.br/\"\u003ena trilha de NODE JS\u003c/a\u003e Da \u003ca href\"https://rocketseat.com.br/\"\u003e Rocketseat\u003c/a\u003e . \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"GitHub contagem de linguagens\" src=\"https://img.shields.io/github/languages/count/FranciscoWallison/nlw-05-nodejs?color=%2304D361\u0026style=plastic\"\u003e\n\n  \u003cimg alt=\"Tamanho do repositório\" src=\"https://img.shields.io/github/languages/code-size/FranciscoWallison/nlw-05-nodejs?style=plastic\"\u003e\n\n  \n  \n  \u003cimg alt=\"licensa\" src=\"https://img.shields.io/github/license/FranciscoWallison/nlw-05-nodejs?style=plastic\"\u003e\n\n  \u003cimg src=\"https://img.shields.io/github/forks/FranciscoWallison/nlw-05-nodejs?style=plastic\"\u003e\n\n  \u003ca href=\"https://github.com/FranciscoWallison/nlw-05-nodejs/commits/master\"\u003e\n    \u003cimg alt=\"GitHub último commit\" src=\"https://img.shields.io/github/last-commit/FranciscoWallison/nlw-05-nodejs?style=plastic\"\u003e\n  \u003c/a\u003e\n\n  \u003cp align=\"center\" \u003e\u003ca href=\"https://github.com/FranciscoWallison\" \u003e \u003cimg alt=\"Wallison\" src=\"https://img.shields.io/badge/Desenvolvido%20por-Wallison%20-brightgreen\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n## 📕 Indice\n\n* [📋 Sobre](#-sobre-o-projeto)\n* [🚀 Milhas Extras:](#-milhas-extras)\n* [:cyclone: CI/CD](#cicd)\n*  -[:artificial_satellite: Pipeline Jenkis](#pipeline)\n*  -[:white_check_mark: Testing sqlite, mysql , postgres, mongoDB](#testing-sqlite-mysql-e-postgres)\n*  -[:shopping_cart: Screenshot](#screenshot) \n* [🦸 Observações e dicas para esta utilizando projeto.](#obs)\n\n  \n  \n ## 📋 Sobre o projeto\n\nO \u003cstrong\u003eNPS-API\u003c/strong\u003e é uma Chat utilizando socket.io.\n\n## 🚀 Milhas Extras\nEsse projeto foi desenvolvido com as seguintes tecnologias:\n- [Typescript](https://www.typescriptlang.org/)\n- [Node.js](https://nodejs.org/en/)\n- [Express](https://expressjs.com/pt-br/)\n- [NPM](https://www.npmjs.com/)\n- [Typeorm](https://typeorm.io/)\n- [Jestjs](https://jestjs.io/)\n- [Sqlite](https://www.sqlite.org/)\n- [MySql](https://www.mysql.com/)\n- [Postgres](https://www.postgresql.org/)\n- [MongoDB](https://www.mongodb.com/)\n- [Docker](https://www.docker.com/)\n- [Heroku](https://dashboard.heroku.com/)\n- [Jenkins](https://www.jenkins.io/)\n- [SonarQube](https://www.sonarqube.org/)\n\n## :cyclone: CI/CD\n#### Pipeline\n[Link do Artigo Jenkins](https://github.com/FranciscoWallison/Desenvolvimento-de-aplicacoes-com-Microsservicos/tree/master/Devops/JENKINS)\n![jenkis](https://github.com/FranciscoWallison/nlw-04-nodejs/blob/master/inforFiles/jenkis.png)\n[Link do Artigo SonarQube](https://github.com/FranciscoWallison/Desenvolvimento-de-aplicacoes-com-Microsservicos/tree/master/Devops/SonarQube)\n![SonarQube](https://github.com/FranciscoWallison/Desenvolvimento-de-aplicacoes-com-Microsservicos/blob/master/Devops/SonarQube/fotos/sonar_dashboard.png)\n\n\n### Deploy\nEsse projeto se utiliza dos serviços gratuitos do heroku, montado com docker \n[Link Heroku](https://nlw-05-nodejs.herokuapp.com/pages/client)\n### Screenshot\n![screenshot](https://github.com/FranciscoWallison/nlw-05-nodejs/blob/master/imgs/home.png)\n![screenshotbot](https://github.com/FranciscoWallison/nlw-05-nodejs/blob/master/imgs/bot_nlw.png)\n\n## OBS: \n#### 1 Lembrar de abrir o bash e instalar o \"npm install\".\n#### 2 Para estar selecionando os [DRIVES](https://github.com/FranciscoWallison/nlw-05-nodejs/blob/main/docker-compose.yml#L21).\n#### 3 O comando [yarn dev-mr](https://github.com/FranciscoWallison/nlw-05-nodejs/blob/main/nodejs/package.json#L10) ajudará a startar o projeto com as migrações.\n#### 4 O comando [yarn typeorm-mc](https://github.com/FranciscoWallison/nlw-05-nodejs/blob/main/nodejs/package.json#L11) ajudará a criar a migração na database selecionada. exemplo  ```typeorm-mc \u003cDescriptionMigration\u003e```.\n#### 5 Referencia utilizada para criar webhook com jenkins, github e dockerhub [aqui](https://medium.com/@naistangz/building-a-ci-cd-pipeline-for-a-node-js-app-with-docker-and-jenkins-ee6db6e70d25).\n#### 6 Possíveis erros e suas soluções [aqui](https://github.com/FranciscoWallison/nlw-05-nodejs#table-database_nlw_testsurveys-doesnt-exist).\n\n_______\n## Comandos básicos Docker e DOCKER-COMPOSE\n#### Executando docker-compose \n- docker-compose -f \"docker-compose.yml\" down\n- docker container exec -u 0 -it 14802ce72cc4 bash\n## Comandos básicos MIGRATIONS\n#### Executando migrations\n - yarn typeorm migration:run\n#### Revertendo migrations\n - yarn typeorm migration:revert\n#### Criando migrations\n - yarn typeorm migration:create -n CreateUsers\n \n# Banco\n## Comandos básicos SQLITE\n#### Install sqlite3 LINUX\n- sudo apt install sqlite3\n#### Acessando banco \n-  sqlite3 database.sql\n#### Lista todos as tabelas\n- .tables\n\n## Comandos básicos POSTGRES\n-  psql -U postgres\n#### Lista todos os bancos\n- \\l\n#### Selecionar o banco \n- \\c database_nlw postgres\n#### Lista todos as tabelas\n- \\d\n\n## Comandos básicos MYSQL\n- mysql -uroot -proot\n#### lista todos os bancos\n- show databases;\n#### Selecionar o banco \n- USE database_nlw;\n#### Lista todos as tabelas\n- show tables;\n\n# Erros\n## Table 'database_nlw_test.surveys' doesn't exist\n#### Solução \n    - yarn typeorm schema:drop -c \"$CONNECTION_DRIVE\"_test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranciscowallison%2Fnlw-05-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranciscowallison%2Fnlw-05-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranciscowallison%2Fnlw-05-nodejs/lists"}