Skip to content

Instantly share code, notes, and snippets.

@rch850
Created February 25, 2018 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rch850/1adf7c5727fbbcb81301e5c21f985418 to your computer and use it in GitHub Desktop.
Save rch850/1adf7c5727fbbcb81301e5c21f985418 to your computer and use it in GitHub Desktop.
curling
var express = require('express');
var router = express.Router();
const AA = `| |
| |
| |
| |
| |
| |
| |
| ------- |
| --◯ -- |
| - - |
| - ◉ - |
| - ◉ - |
| - - |
| - ◯ - |
| -- -- |
| ------- |
| |
| 銅メダルおめでとう! |
| |`
/* GET home page. */
router.get('/', function(req, res, next) {
let lines = AA.split('\n')
const i = setInterval(() => {
if (lines.length > 0) {
res.write(lines.shift() + '\n')
} else {
res.end()
clearInterval(i)
}
}, 200)
});
module.exports = router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment