diff --git a/package.json b/package.json index 5e5adfb..b4b56f9 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,11 @@ "description": "ImplementaĆ§Ć£o do https://tabnews.com.br para o curso https://curso.dev", "main": "index.js", "scripts": { - "dev": "npm run services:up && npm run wait-for-postgres && npm run migration:up && next dev", + "dev": "npm run services:up && npm run services:wait:database && npm run migration:up && next dev", "services:up": "docker compose -f infra/compose.yaml up -d", "services:stop": "docker compose -f infra/compose.yaml stop", "services:down": "docker compose -f infra/compose.yaml down", + "services:wait:database": "node infra/scripts/wait-for-postgres.js", "lint:prettier:check": "prettier --check .", "lint:prettier:fix": "prettier --write .", "lint:eslint:check": "next lint --dir .", @@ -15,7 +16,6 @@ "test:watch": "jest --watchAll --runInBand", "migration:create": "node-pg-migrate -m infra/migrations create", "migration:up": "node-pg-migrate -m infra/migrations --envPath .env.development up", - "wait-for-postgres": "node infra/scripts/wait-for-postgres.js", "prepare": "husky", "commit": "cz" }, @@ -50,4 +50,4 @@ "path": "./node_modules/cz-conventional-changelog" } } -} +} \ No newline at end of file