forked from boale/rs-cart-api
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Task 9 r #9
Open
Latvels
wants to merge
6
commits into
rolling-scopes-school:main
Choose a base branch
from
Latvels:Task-9-R
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Task 9 r #9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hazardsoft
added a commit
to hazardsoft/nodejs-aws-cart-api
that referenced
this pull request
Aug 10, 2024
… (Docker platform) (#2) * feat: compile server and serverless implementations * feat: add Dockerfile to build server details: use Docker Compose to run cart-api comprising of postgres and nest.js app * refactor: create prisma:deploy and prisma:seed scripts to run with diff envs * feat: compile prisma seed script * docs: add comments to .dockerignore * feat: create Dockerfile to build image with cart api server * fix: export port as part of Elastic Beanstalk platform Docker requirements * feat: add cloudwatch streaming config for Elastic Beanstalk application * feat: add .ebignore as part of Elastic Beanstalk application config * feat: add npm scripts for Elastic Beanstalk application details: 1. env-cmd vars expansion is used to pass DATABASE_URL to env vars of EB application 2. Dockerfile is used to build image on EC2 instance (docker-compose.yml is ignored by .ebignore) * fix: include .ebextensions into Elastic Beanstalk deploy * rolling-scopes-school#8: Integrate wiht AWS RDS (Postgres) (#1) * fix: add missing properties to a user's cart * feat: use esbuild to compile project * feat: wrap nest app as serverless function details: create aws cdk stack to deploy lambda handler * feat: add Prisma ORM to the project details: define cart and cart_items db schemas * feat: add postgres docker image for local testing * feat: add Product model to db schema * feat: add Prisma seed script to fill db with initial data * feat: add users table with relation to cart * fix: indicate correct entry point for cart lambda handler * refactor: rename prisma models properties * test: actualize e2e test * refactor: remove rows in cascade on removing relations * refactor: drop 'count' column in products table * feat: use Postgres to store data in cart service * tests: add integration test for Prisma service * feat: users service uses prisma service to store/retrieve data * fix: does not include cdk into source files * feat: cart controller uses basic auth for get/put methods details: add e2e tests for cart controller * feat: add possibility to create orders details: 1. create 'orders' table 2. update 'checkout' endpoint in cart controller 3. create order via prisma transaction 4. add integration tests for order creation 5. add e2e tests for order creation * feat: create rest api with proxy method to pass all the data to cart handler details: reference already existing db instance by its attributes * fix: include prisma linux query lib into cart lambda source code * refactor: drop 'products' table details: cart service should not save products data as its already present in 'products' service, so it will operate 'product_id'/'count' only * refactor: remove jwt/local auth strategies (use basic only) * refactor: bootstrap nest application in separate module details: clearly split server (listening to a port) and serverless implementations * feat: give final shape to input/output of cart controller/service details: cart creation/update/checkout implemented fully * refactor: remove 'calculateCartTotal' as there's no info about a product price * tests: update integration/e2e tests of cart service * refactor: squash prisma migrations * refactor: resolve dest of prisma query lib relatively to output dir * refactor: use webpack to build nest.js application details: esbuild does not respect 'experimentalDecorators' which are heavily used by nest.js for injection (see details at https://esbuild.github.io/content-types/#tsconfig-json) * refactor: remove PrismaModule import in AuthModule * feat: create rds db instance (postgres) via aws cdk * fix: correct supertest import in tests * feat: ignore 'cdk*' files and folders with prettier * feat: enable source maps for aws cdk build * feat: create network construct for managing connections between lambda and rds details: 1. network constructs creates security groups to establish connection between lambda and rds db instance 2. db instance endpoint host/port are used to create database url passed as end to lambda handler 3. lambda handler is deployed to one AZ only (the same availability zone is used by db instance) * refactor: take server port from env var * refactor: rename db env vars to conform with aws cdk * feat: add scripts to deploy/seed local/remote db instance with prisma * docs: add documentation for aws cdk stack * refactor: move aws cdk account id/region env vars to config * tests: actualize aws cdk unit tests * fix: correct formatting in cdk/README.md * fix: use .env.local or .env.remote depending where db changes are required * docs: add documentation for cart service * feat: add method to delete cart of a user * docs: add mentioning of .env file used for local development by default * tests: add Postman collection to test Cart service details: update README with info about Postman collection * feat: remove public access to RDS DB instance * refactor: remove internet <-> RDS security group * refactor: change eb instance type to t2.micro details: t2.micro falls under Free Tier 750h/month rule in eu-central-1 (Frankfurt) region * feat: add http api to proxy requests from HTTPS endpoint to EB HTTP endpoint * fix: add default headers to http proxy api to support CORS * docs: add information about docker/eb npm scripts
hazardsoft
added a commit
to hazardsoft/nodejs-aws-cart-api
that referenced
this pull request
Aug 10, 2024
… (Docker platform) (#3) * fix: add missing properties to a user's cart * feat: use esbuild to compile project * feat: wrap nest app as serverless function details: create aws cdk stack to deploy lambda handler * feat: add Prisma ORM to the project details: define cart and cart_items db schemas * feat: add postgres docker image for local testing * feat: add Product model to db schema * feat: add Prisma seed script to fill db with initial data * feat: add users table with relation to cart * fix: indicate correct entry point for cart lambda handler * refactor: rename prisma models properties * test: actualize e2e test * refactor: remove rows in cascade on removing relations * refactor: drop 'count' column in products table * feat: use Postgres to store data in cart service * tests: add integration test for Prisma service * feat: users service uses prisma service to store/retrieve data * fix: does not include cdk into source files * feat: cart controller uses basic auth for get/put methods details: add e2e tests for cart controller * feat: add possibility to create orders details: 1. create 'orders' table 2. update 'checkout' endpoint in cart controller 3. create order via prisma transaction 4. add integration tests for order creation 5. add e2e tests for order creation * feat: create rest api with proxy method to pass all the data to cart handler details: reference already existing db instance by its attributes * fix: include prisma linux query lib into cart lambda source code * refactor: drop 'products' table details: cart service should not save products data as its already present in 'products' service, so it will operate 'product_id'/'count' only * refactor: remove jwt/local auth strategies (use basic only) * refactor: bootstrap nest application in separate module details: clearly split server (listening to a port) and serverless implementations * feat: give final shape to input/output of cart controller/service details: cart creation/update/checkout implemented fully * refactor: remove 'calculateCartTotal' as there's no info about a product price * tests: update integration/e2e tests of cart service * refactor: squash prisma migrations * refactor: resolve dest of prisma query lib relatively to output dir * refactor: use webpack to build nest.js application details: esbuild does not respect 'experimentalDecorators' which are heavily used by nest.js for injection (see details at https://esbuild.github.io/content-types/#tsconfig-json) * refactor: remove PrismaModule import in AuthModule * feat: create rds db instance (postgres) via aws cdk * fix: correct supertest import in tests * feat: ignore 'cdk*' files and folders with prettier * feat: enable source maps for aws cdk build * feat: create network construct for managing connections between lambda and rds details: 1. network constructs creates security groups to establish connection between lambda and rds db instance 2. db instance endpoint host/port are used to create database url passed as end to lambda handler 3. lambda handler is deployed to one AZ only (the same availability zone is used by db instance) * refactor: take server port from env var * refactor: rename db env vars to conform with aws cdk * feat: add scripts to deploy/seed local/remote db instance with prisma * docs: add documentation for aws cdk stack * refactor: move aws cdk account id/region env vars to config * tests: actualize aws cdk unit tests * fix: correct formatting in cdk/README.md * fix: use .env.local or .env.remote depending where db changes are required * docs: add documentation for cart service * feat: add method to delete cart of a user * docs: add mentioning of .env file used for local development by default * tests: add Postman collection to test Cart service details: update README with info about Postman collection * feat: compile server and serverless implementations * feat: add Dockerfile to build server details: use Docker Compose to run cart-api comprising of postgres and nest.js app * refactor: create prisma:deploy and prisma:seed scripts to run with diff envs * feat: compile prisma seed script * docs: add comments to .dockerignore * feat: create Dockerfile to build image with cart api server * fix: export port as part of Elastic Beanstalk platform Docker requirements * feat: add cloudwatch streaming config for Elastic Beanstalk application * feat: add .ebignore as part of Elastic Beanstalk application config * feat: add npm scripts for Elastic Beanstalk application details: 1. env-cmd vars expansion is used to pass DATABASE_URL to env vars of EB application 2. Dockerfile is used to build image on EC2 instance (docker-compose.yml is ignored by .ebignore) * fix: include .ebextensions into Elastic Beanstalk deploy * feat: remove public access to RDS DB instance * refactor: remove internet <-> RDS security group * refactor: change eb instance type to t2.micro details: t2.micro falls under Free Tier 750h/month rule in eu-central-1 (Frankfurt) region * feat: add http api to proxy requests from HTTPS endpoint to EB HTTP endpoint * fix: add default headers to http proxy api to support CORS * docs: add information about docker/eb npm scripts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TASK
FE PR
Add to localStorage:
Key: authorization_token
Value: TGF0dmVsczpQYXNzd29yZDEh
Evaluation criteria (70 points for covering all criteria)
Additional (optional) tasks