Skip to content

theycallmetyson/tcmt-movie-fullstack-demo

Repository files navigation

Movie fullstack demo app with TS, Vite and Vitest ready to deploy into Docker container.

This is a simple demo of a movie fullstack app with React as frontend, Express & Node as backend and Mongodb as database with Redis in between. The whole project is using Typescript, Vite and Vitest as test framework.

This simple demo of a movie fullstack app also utilises Husky and Commitlint to tidy up the commits.

Installation

Use the package manager npm to install all the dependencies separately in backend, frontend and the root folder.

npm install

Running local dev environment

npm run dev

Preview prod

Previews the compilated app. Remember to build before preview to see latest changes or if first time running preview.

npm run preview

Tests

Run tests

npm run test

There's also a ui for the tests.

npm run test-ui

Build

The build is going to delete any existing dist folder and then compile new one files in a new dist folder.

npm run build

Docker

When deploying to docker, it will simulate a production environment and deploy the compiled files in the dist folders to make the app as small as possible.

Deploy (detached mode)

docker compose up -d

Update

Remember to undeploy before building the new image.

docker compose build

Undeploy

docker compose down

Commitlint types

  • build
  • chore
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Example:

git commit -m "fix: squashed some bugs"