{"id":19641333,"url":"https://github.com/williamkoller/api-sales","last_synced_at":"2025-02-26T23:13:45.296Z","repository":{"id":47663325,"uuid":"333448510","full_name":"williamkoller/api-sales","owner":"williamkoller","description":"API Sales","archived":false,"fork":false,"pushed_at":"2022-03-11T02:10:34.000Z","size":280,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-09T19:13:39.965Z","etag":null,"topics":["api","cors","docker","express","http","typeorm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/williamkoller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-27T14:33:05.000Z","updated_at":"2022-02-25T02:04:26.000Z","dependencies_parsed_at":"2022-09-12T16:21:08.295Z","dependency_job_id":null,"html_url":"https://github.com/williamkoller/api-sales","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamkoller%2Fapi-sales","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamkoller%2Fapi-sales/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamkoller%2Fapi-sales/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamkoller%2Fapi-sales/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williamkoller","download_url":"https://codeload.github.com/williamkoller/api-sales/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240947671,"owners_count":19883031,"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","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":["api","cors","docker","express","http","typeorm","typescript"],"created_at":"2024-11-11T14:08:52.790Z","updated_at":"2025-02-26T23:13:45.279Z","avatar_url":"https://github.com/williamkoller.png","language":"TypeScript","readme":"# API de Vendas\n\n- Etapas para setup\n\n  - `yarn install --frozen-lockfile`\n  - `cp -r env.example .env`\n\n    ```\n    # Database\n    POSTGRES_HOST=\n    POSTGRES_USER=\n    POSTGRES_PASSWORD=\n    POSTGRES_DATABASE=\n    POSTGRES_PORT=\n\n    # Application\n    PORT=300\n    JWT_SECRET=\n    JWT_EXPIRES_IN=\n    ```\n\n  - criar arquivo `ormconfig.json`\n\n  ```\n  {\n    \"type\": \"postgres\",\n    \"host\": \"localhost\",\n    \"port\": 5432,\n    \"username\": \"root\",\n    \"password\": \"root\",\n    \"database\": \"db_api_sales\",\n    \"logging\": false,\n    \"sincronazed\": true,\n    \"entities\": [\"./src/modules/**/typeorm/entities/*.ts\"],\n    \"migrations\": [\"./src/shared/typeorm/migrations/*.ts\"],\n    \"cli\": {\n      \"migrationsDir\": \"./src/shared/typeorm/migrations\"\n  }\n  ```\n\n  - rodar docker `docker-compose up -d \u0026\u0026 yarn dev`\n  - rodar migrations `yarn typeorm migration:run`\n\n- Postman\n  - Como pegar token automaticamente\n  - Ir no tab de tests do postman\n\n    ```\n    var res = pm.response.json();\n    pm.environment.set('token', res.token);\n    ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamkoller%2Fapi-sales","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamkoller%2Fapi-sales","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamkoller%2Fapi-sales/lists"}