--- title: "Express" description: "Serve Pulse analytics from your Express.js app. Middleware or template-based setup." category: "backend" brandColor: "#000000" officialUrl: "https://expressjs.com" relatedIds: ["flask", "nextjs", "react"] date: "2026-03-28" --- Add the Pulse script to your template engine's layout (EJS, Pug, Handlebars) or serve it via static HTML. --- ## Method 1: EJS template If you use EJS as your template engine, add the script to your layout with a production guard. ```html filename="views/layout.ejs"
<% if (process.env.NODE_ENV === 'production') { %> <% } %>