A project for experimenting with Server Sent Events (SSE), a way of communication going from server to client.

Overview

Server Sent Events

This is a project for experimenting with Server Sent Events (SSE), a way of communication going from server to client. It's not a WebSocket competitor, but more like an alternative for specific cases, mainly for when a bidirectional communication is not really necessary. While this is not the SSE's purpose, we can simulate bidirectional communication by using common POST requests to send from client to server, and SSE to listen from server to client. Last but not least, SSE is entirely based on HTTP protocol.

PS: the purpose of this project was entirely related to server-client communication. No design pattern, project structure, SOLID concept nor UI/UX were intended to be covered here.

Host

Backend

The backend is hosted on Heroku and accessible at:

https://server-sent-events-mullet.herokuapp.com/

Frontend

The frontend is hosted on Vercel and accessible at:

https://v1-sse-mullet.vercel.app/ - for a simpler solution

and

https://v2-sse-mullet.vercel.app/ - for a smarter solution, with different message types, that is from the v2 branch

Running

Ping/pong

To understand how the things would work, there is a simple endpoint called /ping, where the server keeps sending a pong message each 2 seconds while the connection lives. You can access it here: https://v2-sse-mullet.vercel.app/ping.

Although simple, it is enough to see the server sending events to the client without the need of a new protocol, like websocket does.

Notifications provider

For a more smarter solution, I created something like a notifications provider. To be a client of it, you just need to access this link: https://v2-sse-mullet.vercel.app/.

To send notifications, you can access the link https://v2-sse-mullet.vercel.app/send-notification, and fill the form. The server will send the notification to every client connected.

Stack

  • Typescript
  • Javascript
  • ReactJS
  • NodeJS
  • Express
  • NextJS
  • Fetch API

Useful links

You might also like...

Start building admin tools on Slack without going into complex slack syntax and flows.

Start building admin tools on Slack without going into complex slack syntax and flows.

Slackmin Slackmin helps in easy integration with slack to use slash commands, interactive components, format and send messages, design and use modals.

Jan 2, 2023

A plugin for Strapi Headless CMS that provides ability to sign-in/sign-up to an application by link had sent to email.

A plugin for Strapi Headless CMS that provides ability to sign-in/sign-up to an application by link had sent to email.

Strapi PasswordLess Plugin A plugin for Strapi Headless CMS that provides ability to sign-in/sign-up to an application by link had sent to email. A pl

Dec 12, 2022

Verify your E-Mail and Phone Number using link sent over mail and sms.

Verify your E-Mail and Phone Number using link sent over mail and sms.

Phone-and-Mail-Verification-With-Link Verify your E-Mail and Phone Number using link sent over mail and sms. Endpoints POST /user/create Body { "n

Sep 14, 2022

❌ Disable spam emails sent by the Claremont Colleges.

❌ Disable spam emails sent by the Claremont Colleges.

Claremont Spam Disabler Have you ever had the misfortune of seeing an email like this? Most likely not, unless you at one point attended a college in

Jun 5, 2022

Verify your E-Mail and Phone Number using link sent over mail and sms.

Verify your E-Mail and Phone Number using link sent over mail and sms.

Send Verification Link ✅ Explore the docs » • Report Bug • Request Feature • About The Project Verify your E-Mail and Phone Number using link sent ove

Jun 28, 2022

enables communication between command-line or desktop applications and browser-based Ethereum wallets such as Metamask.

@securerpc/walletbus @securerpc/walletbus Abstract Quickstart Installation Usage Ethers.js Web3.js Configuration options Logging Development Automated

Dec 27, 2022

Inter Process Communication Module for node supporting Unix sockets, TCP, TLS, and UDP. Giving lightning speed on Linux, Mac, and Windows. Neural Networking in Node.JS

Inter Process Communication Module for node supporting Unix sockets, TCP, TLS, and UDP. Giving lightning speed on Linux, Mac, and Windows. Neural Networking in Node.JS

Inter Process Communication Module for node supporting Unix sockets, TCP, TLS, and UDP. Giving lightning speed on Linux, Mac, and Windows. Neural Networking in Node.JS

Dec 9, 2022

An open-source analytics library to measure user events the hassle-free way.

An open-source analytics library to measure user events the hassle-free way.

walker.js The walker.js is an open-source event tracker for all tools. Easy, standardized & flexible. Capture user events in the browser by setting HT

Dec 22, 2022

It's the ragemp server middlewares for events

RageMP Server Middlewares Данный пример промежуточных функций разработан, чтобы любые другие разработчики могли им пользоваться. Документация: App App

Sep 8, 2022
Owner
Italo Menezes
Web and mobile developer, coffee enthusiast, javascript lover, and also undergraduate student in Computer Science.
Italo Menezes
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Telegram Chatting is a web site-based two-way real-time chat communication application.

Telegram Chatting is a web site-based two-way real-time chat communication application. Has features including two-way private messaging between users, searching user lists, viewing profiles between users, and updating user data.

Nur Muhammad Alif Putra Setiawan 6 Dec 27, 2022
Lightweight, fast and framework-agnostic sse service for NodeJS

SSE service Lightweight, fast and framework-agnostic sse service for NodeJS Written on TS. Features Could be embedded to Express, Fastify, Nest, etc.

null 9 Dec 9, 2022
(Experimenting) Transform CSS Modules to enable Atomic CSS benefits 🌱

MatoCSS Transform CSS Modules to enable Atomic CSS benefits Please note that it is still experimenting. I do not recommend using this in production. U

Huy Nguyen 4 Nov 24, 2022
A POC of a Discord.js bot that sends 3D rendering instructions to a Go server through gRPC which responds with the image bytes which are then sent back on Discord.

A POC of a Discord.js bot that sends 3D rendering instructions to a Go server through gRPC which responds with the image bytes which are then sent back on Discord.

Henrique Corrêa 5 Jan 8, 2022
This is the FARM Stack course, where you are going to learn how to build an application from scratch using FASTAPI, React and mongoDB

FARM-Stack-Course This is the FARM Stack course, where you are going to learn how to build an application from scratch using FASTAPI, React and mongoD

Bek Brace 121 Jan 2, 2023
For this workshop, we're going to learn more about cloud computing by exploring how to use Pulumi to build, configure, and deploy a real-life, modern application using Docker

For this workshop, we're going to learn more about cloud computing by exploring how to use Pulumi to build, configure, and deploy a real-life, modern application using Docker. We will create a frontend, a backend, and a database to deploy the Pulumipus Boba Tea Shop. Along the way, we'll learn more about how Pulumi works.

Kat Cosgrove 9 Dec 29, 2022