Skip to content

AlexanderSUS/nodejs-aws-cart-api

This branch is 14 commits ahead of, 14 commits behind rolling-scopes-school/nodejs-aws-cart-api:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

222fb7d · Aug 2, 2024

History

36 Commits
Aug 2, 2024
Jul 31, 2024
Aug 2, 2024
Jul 28, 2024
Aug 2, 2024
Aug 2, 2024
Nov 19, 2020
Aug 2, 2024
Aug 1, 2024
Aug 2, 2024
Jul 31, 2024
Jul 27, 2024
Jul 28, 2024
Nov 19, 2020
Aug 2, 2024
Aug 2, 2024
Jul 28, 2024
Jul 28, 2024
Jul 31, 2024

Repository files navigation

nodejs-aws-cart-api

installation

npm i && (cd cdk && npm i)

create .env file and put there vars from env.example file. Replace values as needed

apply migrations to the database

npm run knex:migrate:latest

build and deploy

npm run build && (cd cdk && cdk synth && cdk deploy)

To create user and get basic auth token via cli run

./get-token.sh

Migrations

generate empty migration

npm run knex:migrate:make your-new-migration-name 

run migrations

npm run knex:migrate:latest

generate empty seed migration

npm run knex:seed:make

run seed migrations

npm run knex:seed:run

Tests

Before running test run postgres in docker container

docker compose up -d

Unit tests

npm run test

E2E test

npm run test:e2e

Test deploy locally with AWS SAM

  1. Install AWS SAM
  2. create .env file and put there vars from env.example file. Replace values as needed
  3. install dependencies with command
npm i && (cd cdk && npm i)
  1. Run database in docker
docker compose up -d
  1. Apply migrations
npm run knex:migrate:latest

About

CartApi for NodeJS in AWS course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.9%
  • JavaScript 3.5%
  • Shell 1.2%
  • Dockerfile 0.4%