• This project
    • Loading...
  • Sign in

이정민 / OPproject

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • OPproject
  • sse.js
  • 서예진's avatar
    socket.js, sse,js · 2c7996ac
    2c7996ac
    서예진 authored 2019-12-03 19:30:53 +0900
sse.js 217 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10
const SSE = require('sse');

module.exports = (server) => {
  const sse = new SSE(server);
  sse.on('connection', (client) => {
    setInterval(() => {
      client.send(Date.now().toString());
    }, 1000);
  });
};