Simple site written in Swift that shows the contrast of two colors using the Color package.
- Install Xcode 11
- Run
brew install cairo
. (You’ll need Homebrew for this.) - Run
swift package generate-xcodeproj
- Open ContrastWeb.xcodeproj
- Select
ContrastWeb
from the dropdown in the top left (notContrastWeb-Package
) - Click
▶️
Now the site is running at localhost:8080. Try something like localhost:8080/fff/000 since the root redirects to the marketing site.
This site is deployed to Google Cloud Run.
Be sure to increment the version in this command:
$ docker build -t gcr.io/usecontrast/contrast-web:v2 .
This will start the server locally at localhost:8080. Be sure to update the version in the image name.
$ docker run -d -p 8080:8080 gcr.io/usecontrast/contrast-web:v2
(To stop this, run docker ps
in a new tab and note the container ID of the most recent one. Then run docker stop CONTAINER_ID
.)
Be sure to update the version number in the image name.
$ docker push gcr.io/usecontrast/contrast-web:v2
Be sure to update the version number in the image name.
$ gcloud beta run deploy contrast-web --image gcr.io/usecontrast/contrast-web:v2
You can also use the console.