An open API service indexing awesome lists of open source software.

https://github.com/alextanhongpin/node-web-push

koa server to handle push notification registration and sending messages
https://github.com/alextanhongpin/node-web-push

koa node nodejs push-notifications serviceworker web-push

Last synced: about 2 months ago
JSON representation

koa server to handle push notification registration and sending messages

Awesome Lists containing this project

README

        

# node-web-push

A simple __Push Notification Server__ written in koa.

## Setup

`foreman` is used to setup the environment variables and start the server.

To install `foreman` globally:

```bash
# With yarn
$ yarn global add foreman

# With NPM
$ npm i -g foreman
```

To install other dependencies:

```bash
# With yarn
$ yarn install

# With NPM
$ npm i
```

Create a `.env` file which contains the following:

```bash
MAILTO=mailto:[email protected]
```

The `.env` will be automatically loaded when running the server. We skip the `.env` file from being committed to Github by adding it in the `.gitignore` file.

## Run

Start the server with the following comand:
```bash
$ nf start
```

`nf` stands for `node-foreman`. The server should start at port __5000__.