Skip to content

Jhotika/notification-framework-example-inmemory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notification Framework Demo

A demo of Notification Framework integration to a NodeJS/Express application

Installation

  1. Clone the Git repository:

    git clone https://github.com/Jhotika/notification-framework
  2. Install the dependencies using npm:

    npm install

    or yarn:

    yarn install

Usage

  1. Start the express server:

    npm start

    or

    yarn start
  2. Open the browser and navigate to http://localhost:8000/ to see the application in action.

API Endpoints

GET /

Fetches all notifications for a user.

  • Method: GET
  • Response: Returns a JSON object containing an array of notification responses.
  • Error Handling: Returns a 500 status code if fetching notifications fails.

POST /

Sends a new notification.

  • Method: POST
  • Action: Performs an action and sends a notification using YoService.
  • Response: Returns a JSON object with a success message.
  • Error Handling: Returns a 500 status code if sending the notification fails.

POST /markAllAsRead

Marks all notifications as read for the current user.

  • Method: POST
  • Action: Marks all notifications as read using the notification service.
  • Response: Returns a JSON object indicating success.
  • Error Handling: Returns a 500 status code if marking notifications as read fails.

POST /:uuid

Marks a specific notification as read.

  • Method: POST
  • Parameters: uuid - The unique identifier of the notification to mark as read.
  • Action: Marks the specified notification as read using YoService.
  • Response: Returns a JSON object with a success message.
  • Error Handling: Returns a 500 status code if marking the notification as read fails.

Demo

Screen.Recording.2024-08-30.at.11.47.10.AM.mov

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published