Skip to content
/ hey Public

A simple application to send notifications using socket

Notifications You must be signed in to change notification settings

Ellathet/hey

Repository files navigation

A simple application to send notification using socket.io and node.js

Description

I always think about how things are behind it, so based on the firebase message service, I decided to create my own, first which technology to use?

  • Socket is my first choice
  • Node.js, simple and powerfull solution

So I started creating it, and this is the result

How to start

  • You can use docker, to start the application inside a container, just run: docker-compose up --build -d in main path.

To start in dev environment, you need use: node >= 16, yarn >= 1.22, this app using nodemon to hot update feature.

  • Configure your .env file: APP_TOKEN is your password, it is necessary to authenticate the application when you send the notification, or recive. And DATABASE_URL, for default is it is consistent with docker-compose

After config you need run migrations from prisma, run: yarn db:update, after run yarn start:dev and be happy codding 🤯.

Socket

To test socket I'm use firecamp, connected to port 3025, and listen notification:

image

To auth, in Connections tab, send your token set in .env: image

When you send post in path api/notification, the app emit the notification to all socket connections avaible.

Dashboard

  • To see in a more friendly version use the dashboard, in this repository

About

A simple application to send notifications using socket

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published