Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#187419064 A seller should be able to CRUD products #21

Merged
merged 1 commit into from
May 1, 2024
Merged
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
9 changes: 8 additions & 1 deletion .env-example
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
PORT = <Your application port>

SERVER_URL=http://localhost:<PORT>
DEPLOYED_URL=https://hackers-ec-be.onrender.com

DB_DEV_URL=postgres://<user>:<password>@localhost:5432/<database>
DB_TEST_URL=
DB_PROD_URL=
DEV_MODE=development
DB_HOSTED_MODE=local
PORT = <Your application port>

SESSION_SECRET=

Expand All @@ -27,3 +31,6 @@ SERVICE = < your SERVICE >
EMAIL=<your email>
PASSWORD=<email password>

CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
6 changes: 4 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
DB_PROD_URL: ${{ secrets.DB_PROD_URL }}
DB_DEV_URL: ${{ secrets.DB_DEV_URL }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}

DEPLOYED_URL: ${{ secrets.DEPLOYED_URL }}
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }}
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }}
CLOUDINARY_FOLDER_NAME: ${{ secrets.CLOUDINARY_FOLDER_NAME }}
SERVER_URL: ${{ secrets.SERVER_URL }}
DEPLOYED_URL: ${{ secrets.DEPLOYED_URL }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
strategy:
matrix:
Expand All @@ -52,12 +52,14 @@ jobs:
run: npm install
- name: Run tests
run: npm run test

- name: Setup Code Climate test-reporter
run: |
# Download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build

- name: Store coverage report
if: always()
run: mkdir -p coverage
Expand Down
150 changes: 147 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dev": "ts-node-dev --require dotenv/config src/index.ts",
"build": "tsc",
"start": "node --require dotenv/config dist/index.js",
"drop-all-tables": "psql -U your_username -d your_database_name -c \"SELECT 'DROP TABLE IF EXISTS \"' || tablename || '\" CASCADE;' FROM pg_tables WHERE schemaname = 'public'\" | psql -U your_username -d your_database_name",
"migrate": "npx sequelize-cli db:migrate",
"migrate:reset": "npx sequelize-cli db:migrate:undo:all && npm run migrate && npm run seed",
"migrate:down": "sequelize cli db:migrate:undo:all",
Expand All @@ -31,11 +32,13 @@
"bcrypt": "^5.1.1",
"cross-env": "^7.0.3",
"cors": "^2.8.5",
"cloudinary": "^2.2.0",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"express-session": "^1.18.0",
"joi": "^17.12.3",
"jsonwebtoken": "^9.0.2",
"multer": "^1.4.5-lts.1",
"nodemailer": "^6.9.13",
"npm-run-all": "^4.1.5",
"passport": "^0.7.0",
Expand Down Expand Up @@ -66,7 +69,8 @@
"/src/database/config",
"src/helpers",
"src/documention/index.ts",
"/src/utils"
"/src/utils",
"src/middlewares/multer.ts"
]
},
"devDependencies": {
Expand All @@ -77,6 +81,7 @@
"@types/express-session": "^1.18.0",
"@types/jest": "^29.5.12",
"@types/jsonwebtoken": "^9.0.6",
"@types/multer": "^1.4.11",
"@types/node": "^20.12.7",
"@types/nodemailer": "^6.4.14",
"@types/passport": "^1.0.16",
Expand Down
Loading