Skip to content

React, Express Typescript and AWS CDK URL shortener

Notifications You must be signed in to change notification settings

aleboarna/longurlrip

Repository files navigation

longurl.rip

Commitizen friendly stability-stable

Table of Contents

Installation

npm i

Core Actions

Linting

nx lint <project>

Testing

nx test <project>

Building

nx build <project>

For API we have build:express & build:lambda to build for deployment on Docker or on serverless Lambda/Cloud Functions etc.

Running

nx serve <project>

Deploying

export CDK_STACK_ENV=<env>
export CDK_DOMAIN_NAME=<domain>
export CDK_DOMAIN_CERTIFICATE_API=<cert_id>
export CDK_DOMAIN_CERTIFICATE_WEB=<cert_id>
nx deploy infra

Development

You can start local development of all dependencies and components by running

docker compose up

or by running the included IntelliJ Run Configuration [Docker] Up

Debugging

To debug an app use included IntelliJ Run Configuration

API: [API][Docker] Debug

Historical Commands

  1. Create monorepo workspace with API
npx create-nx-workspace@16.5.2 longurlrip
nx g @nx/react:setup-tailwind --project=web
  1. Create infra project
nx g @nx/node:application --name infra
nx g @nx/react:setup-tailwind --project=web
  1. Create AWS CDK project for infra project
npx cdk init app --language=typescript 
  1. Create web project
nx g @nx/react:app web
  1. Add tailwind to react web project
nx g @nx/react:setup-tailwind --project=web
  1. Create shared types library for API & web
nx g @nrwl/node:library --name types

TODO

  • API
  • API Docker
  • API Lambda
  • Web
  • Web S3 & CDN
  • API Cognito
  • API Auth

Diagrams

Architectural Diagram

Architectural

About

React, Express Typescript and AWS CDK URL shortener

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published