Git Product home page Git Product logo

browser-basic-template's Introduction

A basic browser app built with SwiftWasm

carton is the recommended way to build and run browser apps built with SwiftWasm. Follow these steps to get started, where you'll install carton via Homebrew on macOS (unfortunately you'll have to build it manually on Linux). After you already have Homebrew installed, just these three steps will get you up and running:

  1. Install carton:
brew install swiftwasm/tap/carton

If you had carton installed before this, make sure you have version 0.9.0 or greater:

carton --version
  1. Build the project and start the development server, carton dev can be kept running during development:
carton dev
  1. After the build succeeds, a page on a development server will open automatically, or you can navigate to http://127.0.0.1:8080/ in your browser manually to see the app running. You can edit the app source code in your favorite editor and save it, carton will immediately rebuild the app and reload all browser tabs that have the app open.

Deployment

You can easily deploy SwiftWasm apps to GitHub Pages. This repository is already set up to do so. If you have GitHub Actions enabled, it will push successful builds to the gh-pages branch on every commit. You only need to enable GitHub Pages in settings of your repository and select gh-pages branch as your publishing source.

You can also deploy the app to any other CDN or hosting that can serve static files. Just run carton bundle in the root directory of this repository clone. This will create a Bundle directory that contains everything you need for the app to work. Then copy the contents of that directory to wherever you'd like to host it.

browser-basic-template's People

Contributors

maxdesiatov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

chfanghr mkll

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.