set up the project
-
clone the Project Repo: git@github.com:Ramadhan0/Online-Marketplace-Inventory-Management.git
-
cd into the project
-
run:
npm i
to install dependencies -
run:
docker-compose up -d
to start postgres and localstack -
run:
npm run dev
to run project -
run:
npm run test
to run tests -
configure local-stack profile:
aws configure --profile localstack
-
create SQS Queue:
aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name sqs-queue --profile localstack
-
create aws lambda:
aws --endpoint-url=http://localhost:4566 lambda create-function --function-name sqs-handler --runtime nodejs14.x --handler lambda.handler --memory-size 128 --zip-file fileb://index.ts --role arn:aws:iam::000000000000:role/trigger
-
create an sns topic:
aws --endpoint-url=http://localhost:4566 sns create-topic --name notification
http://localhost:3000/api/inventory/auth
Get all usershttp://localhost:3000/api/inventory/auth/register
Registerhttp://localhost:3000/api/inventory/auth/login
Loginhttp://localhost:3000/api/inventory/auth/remove/:email
Delete user
http://localhost:3000/api/inventory/products
Create producthttp://localhost:3000/api/inventory/products
Get productshttp://localhost:3000/api/inventory/products/my
Get My Productshttp://localhost:3000/api/inventory/products/single/:id
Get single producthttp://localhost:3000/api/inventory/products/:id
Update Producthttp://localhost:3000/api/inventory/products/:id
Delete Product