https://www.flexpa.com/docs/about/work-sample
This turborepo uses Yarn as a package manager. It includes the following packages/apps:
-
apps/web
: a Next.js app; To work with the Flexpa API you will need a.env.local
file with theNEXT_PUBLIC_FLEXPA_PUBLISHABLE_KEY=
variable set.
-
apps/api
: an Express server; To work with the Flexpa API you will need a.env
file with the:FLEXPA_SECRET_KEY=
variable set.
-
packages/ui
: ui: a React component library -
packages/eslint-config-custom
:eslint
configurations for client side applications (includeseslint-config-next
andeslint-config-prettier
) -
packages/eslint-config-custom-server
:eslint
configurations for server side applications (includeseslint-config-next
andeslint-config-prettier
) -
packages/jest-presets
: Jest configurations -
packages/logger
: Isomorphic logger (a small wrapper around console.log) -
packages/tsconfig
: tsconfig.json files used throughout the monorepo
This repo is configured to be built with Docker, and Docker compose. To build all apps in this repo:
# Create a network, which allows containers to communicate
# with each other, by using their container name as a hostname
docker network create app_network
# Build prod using new BuildKit engine
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml build
# Start prod in detached mode
docker-compose -f docker-compose.yml up -d
Open http://localhost:3000.
To shutdown all running containers:
# Stop all running containers
docker kill $(docker ps -q) && docker rm $(docker ps -a -q)
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Jest test runner for all things JavaScript
- Prettier for code formatting