SkillAgentSearch skills...

Usecontra.st

Contrast color share site

Install / Use

/learn @soffes/Usecontra.st
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ContrastWeb

Simple site written in Swift that shows the contrast of two colors using the Color package.

Running locally

  1. Install Xcode 11
  2. Run brew install cairo. (You’ll need Homebrew for this.)
  3. Run swift package generate-xcodeproj
  4. Open ContrastWeb.xcodeproj
  5. Select ContrastWeb from the dropdown in the top left (not ContrastWeb-Package)
  6. Click ▶️

Now the site is running at localhost:8080. Try something like localhost:8080/fff/000 since the root redirects to the marketing site.

Deploying

This site is deployed to Google Cloud Run.

Build a new image

Be sure to increment the version in this command:

$ docker build -t gcr.io/usecontrast/contrast-web:v2 .

Test the new image

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.)

Push the image

Be sure to update the version number in the image name.

$ docker push gcr.io/usecontrast/contrast-web:v2

Deploy the new image

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.

Related Skills

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated5y ago
Forks3

Languages

Swift

Security Score

60/100

Audited on Jul 10, 2020

No findings