A simple guide for setting up Express.js with Typescript.

more like ‘Express.ts’

Step 1: Setup Directories

mkdir src &&
npm init

Step 2: Install Dependencies

Serverless servers on Google Cloud Run

Featuring an all-in-one shell script.

Step 1: Install Dependencies

npx create-react-app ./client &&
cd client &&
npm install tailwindcss@npm:@tailwindcss/postcss7-compat @tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9 &&
npm install @craco/craco &&
curl 'https://gist.githubusercontent.com/thoughtstile/32737663cab5399e7adc03a911e1e989/raw/9c881b1b596c76766f0137eae740333bbda8b924/tailwind.config.js' -o tailwind.config.js &&
curl https://gist.githubusercontent.com/thoughtstile/192f81657c2593e664e8c6a6969ea700/raw/79447e17ddfdf2ec3909feae27177ec11b32bd68/craco.config.js -o craco.config.js &&
curl https://gist.githubusercontent.com/thoughtstile/95ca6c4df1b9f38e82703857f1d9e562/raw/013b41ecca8d067695df4ea4609ca1aef96f549b/index.css -o ./src/index.css &&
curl https://gist.githubusercontent.com/thoughtstile/5d4b56291b2f5aca60fd5c52763e9e07/raw/3cf89cace76e08220ec56629e380a20799e768ca/App.js -o ./src/App.js &&
cd .. &&
curl https://gist.githubusercontent.com/thoughtstile/660881b321ab8694ddfbe569a41a73e5/raw/f8178f98ffef15b05a5c17b0b5d8e61706cee9d3/Dockerfile -o ./client/Dockerfile &&
curl https://gist.githubusercontent.com/thoughtstile/2a6a761a6b91bf8b26838e5b522165a0/raw/7185c1308dd6633629d1a4264b3d62c3633f3993/nginx.conf -o ./client/nginx.conf &&
curl https://gist.githubusercontent.com/thoughtstile/3e1932f42d5b67bca1dbb034b2968349/raw/cbbac57a3d594a4295e42cd07885aecab61fb3fd/cloudbuild.yaml -o cloudbuild.yaml…

An automated pipeline that triggers on every Github commit.

What Developers Do (Manual):

What Happens (Automatic):

  1. Google Cloud Build sees that you pushed a new commit to Github.
  2. Google Cloud Build builds a container based on the new changes.
  3. Google Cloud Build stores this container…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store