This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
app.use((req, res, next) => { | |
const handler = (event, ...args) => { | |
console.log(`got ${event} (${req.res?.destroyed})`, args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
networks: | |
test-net: | |
name: $COMPOSE_PROJECT_NAME-test-net | |
volumes: | |
test-vol: | |
services: | |
app: | |
volumes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function main() { | |
try { | |
const t = setTimeout(() => { | |
throw new Error('Error'); | |
}, 1000); | |
await new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(); | |
clearTimeout(t); |
OlderNewer