GithubHelp home page GithubHelp logo

service-worker-prototype's Introduction

Service Worker Prototype

Description

I wanted to learn more about service workers and how they could be implemented within a React app, so I created this project.

Commands

I used create-react-app to get this thing up and going quickly, so if you wanted to run this locally, you'll need to first install it using

npm install -g create-react-app

and then run one of the following commands (as output by create-react-app):

npm start -> Starts the development server.

npm run build -> Bundles the app into static files for production.

npm test -> Starts the test runner.

Running the Production Build to test the Service Workers

I'm still in the process of learning how to test service workers within a development build, but in the meantime, they currently work in the production build. In order to run the production build locally, you'll need a static server. pushstate-server is the one I'm currently using as it was recommended by create-react-app, and can be installed by running:

npm install -g pushstate-server

Once it's installed, run the following command to start running the server with the output of npm run build:

pushstate-server build

Note: By default this uses port 9000

You can then view the results at localhost:9000

References

I used the following projects as references in building this:

service-worker-prototype's People

Contributors

ericapisani avatar

Watchers

 avatar

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.