Giter Site home page Giter Site logo

freshy969 / push-notification-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spyna/push-notification-demo

0.0 1.0 0.0 533 KB

How to implement Web Push Notifications with live demo and instructions

Home Page: https://push-notifications-demo.netlify.com/

JavaScript 90.92% HTML 6.37% CSS 2.70%

push-notification-demo's Introduction

How to implement Web Push Notifications with live demo and instructions: https://push-notifications-demo.netlify.com/

A push notificatin

push-notification-demo

This mono-repo project is a demo for this article https://itnext.io/an-introduction-to-web-push-notifications-in-javascript-a701783917ce

The project is composed by two parts:

  • a front end written is HTML + JavaScript

  • a back end written in JavaScript + NodeJS

Run locally

font-end

cd front-end 
npm install 
npm start

Next, open http://localhost:9000.

back-end

cd back-end
npm install
export CORS_ORIGIN=http://localhost:9000 && node src/server.js

export CORS_ORIGIN=http://localhost:9000 means: accept Cross Origin call from this host.

deploying to your server

If you want to deploy the front-end to your server remember to modify the back-end host in the webpack config file: webpack.config.prod.js: 'process.env.PUSH_SERVER_URL': JSON.stringify('https://push-notification-demo-server.herokuapp.com'),

Analytics

push-notification-demo's People

Contributors

spina-at-register avatar spyna 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.