- Ensure you have these installed and accessible from the notebook pyngrok, nest_asyncio, fastapi, uvicorn and other libs you want
%pip install pyngrok nest_asyncio fastapi uvicorn loguru
- Create a FastAPI app
from fastapi import FastAPI
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 |
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
Find the Discord channel in which you would like to send commits and other updates
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
const asyncForEach = async (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} | |
const start = async () => { | |
await asyncForEach([1, 2, 3], async (num) => { | |
await waitFor(50) |
// ~/server/api/sse.ts | |
export default defineEventHandler(async (event) => { | |
if (!process.dev) return { disabled: true } | |
// Enable SSE endpoint | |
setHeader(event, 'cache-control', 'no-cache') | |
setHeader(event, 'connection', 'keep-alive') | |
setHeader(event, 'content-type', 'text/event-stream') | |
setResponseStatus(event, 200) |