๐Ÿ•š JSUsCHยฒR

JavaScriptUnicodeSymbolClockHourlyHabitRepresentation

Shows Unicode symbols representing human activity

First version in nodejs

With the current time zone and single hour precision

const http = require('http');

const hostname = '127.0.0.1';
const port = 3000;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader("Content-Type", "text/plain; charset=utf-8");
  var schedule = ["๐Ÿ˜ด","๐Ÿ˜ด","๐Ÿ˜ด","๐Ÿ˜ด","๐Ÿ˜ด","๐Ÿ˜ด", // hours 00-06
                  "๐Ÿง˜","๐Ÿต","๐ŸŽจ","๐Ÿ‘”","๐ŸŽฎ","๐ŸŽถ", // hours 06-12
                  "๐Ÿฒ","๐Ÿ“ท","๐Ÿ‘”","๐Ÿ’ป","๐Ÿ“","๐Ÿฅ—", // hours 12-18
                  "๐Ÿšถ","๐Ÿ’ช","๐Ÿค—","๐Ÿ“–","๐Ÿ˜ด","๐Ÿ˜ด"];// hours 18-24
  var date = new Date();
  var current_hour = date.getHours();
  res.end(schedule[current_hour]);
});

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});