Code Monkey home page Code Monkey logo

usecontra.st's Introduction

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.

usecontra.st's People

Contributors

mds avatar soffes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

greystate mds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.