eg. async function test() {} or const test = async () => {}
Now you can use await inside that function to pause and wait for values that take their time getting back to us.
Here’s an async function:
// Define our async function and let it use awaitasyncfunctiontest(){constresponse=awaitfetch("https://api.github.com/");// Wait for the Promiseconstjson=awaitresponse.json();// Wait to resolve the Promiseconsole.log(json);// Log the response}test();// Run the function
Okay that’s it! Get it now?
If not, go here for a better explanation. Or leave a comment and I’ll try to help out.
I’ve always liked Ghost as a blogging platform. It’s open source. It runs on Node.js. I even momentarily moved this blog over to Ghost for a little while back in the day.
The only problem is it’s relatively hard to set up hosting for it. You could always just pay the monthly fee, but it’s pretty expensive (as far as blog hosting goes).
But there is a way to set up a Ghost blog on Glitch. Here’s how you do it:
Go to glitch.com and click New Project -> hello-sqlite. This will start a new Glitch project
Click the package.json file on the left and then Add Package and search for “ghost” then click it to install
Create a New File on the left and call it config.development.json with the following in it:
The other day my mate James asked me why it was (strangely) impossible to find my old band The Strange Attractors anywhere on the Internet. Especially for someone as extremely online™ as I was.
Good question Jimmy!
There was no Spotify back then. My old band sort of just slipped out of existence, except in memory.
So I’ve uploaded the album to YouTube for everyone. Enjoy!
On this record is me, Jeremy Sega Dreamboat Neale, Lauren Jenkins, Michael Fletcher, James Boyd, Neal Apel, and Jo-Jo P James.