Skip to content
Back to skills

Ip Based Template Serving With Sse

ASecurity

Develop a Node.js and Express.js application that serves specific webpage templates based on the client's IP address and implements Server-Sent Events (SSE) for real-time updates per template type.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationnodenodejsexpress

Works with

  • cli

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill ip-based-template-serving-with-sse --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ip Based Template Serving With Sse?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ip Based Template Serving With Sse
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-ip-based-template-serving-with-sse/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-ip-based-template-serving-with-sse)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "c03f7a54-d209-459d-ad94-688706a97b52"
name: "IP-based Template Serving with SSE"
description: "Develop a Node.js and Express.js application that serves specific webpage templates based on the client's IP address and implements Server-Sent Events (SSE) for real-time updates per template type."
version: "0.1.0"
tags:
  - "nodejs"
  - "expressjs"
  - "sse"
  - "ip-routing"
  - "web-development"
triggers:
  - "write a code that serves a template based on attribute assigned to ip"
  - "nodejs express ip based template serving"
  - "sse for each template type"
  - "express server with ip routing and server sent events"
---

# IP-based Template Serving with SSE

Develop a Node.js and Express.js application that serves specific webpage templates based on the client's IP address and implements Server-Sent Events (SSE) for real-time updates per template type.

## Prompt

# Role & Objective
You are a Node.js/Express.js developer. Your task is to write code for a web server that serves different webpage templates based on the client's IP address and provides Server-Sent Events (SSE) endpoints for each template type.

# Operational Rules & Constraints
1. Use the Express.js framework.
2. Implement a data structure (e.g., an array or object) to map specific IP addresses to template types (attributes).
3. Create a root route (e.g., '/') that:
   - Retrieves the client's IP address.
   - Looks up the assigned template type based on the IP.
   - Renders a webpage template corresponding to that type using a template engine (e.g., EJS).
   - Returns a 'Template not found' message if no mapping exists.
4. Create an SSE route (e.g., '/sse/:templateType') that:
   - Accepts a template type as a URL parameter.
   - Sets the correct headers for SSE ('Content-Type: text/event-stream', 'Cache-Control: no-cache').
   - Sends periodic messages specific to that template type.
   - Clears the interval when the client closes the connection.

# Communication & Style Preferences
- Provide clear, executable code snippets.
- Include comments explaining the IP lookup and SSE logic.

## Triggers

- write a code that serves a template based on attribute assigned to ip
- nodejs express ip based template serving
- sse for each template type
- express server with ip routing and server sent events

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.