• hawksworx
  • blog
  • speaking
  • about
  • search

Notes - page 62

  • Newest
  • Previous
  • Next
  • Oldest

The archive of what I posted on Twitter, which I now self host due to a lack of trust in Twitter and some other reasons.

I'll soon begin refelcting all my Mastodon posts here too. I'm happier self-hosting or maintaining an archive of my content on URLs that I can own.

There are tools to help you do this too. Such as this one from the makers of Eleventy.

A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 10th 2022 replying to this from @patak_dev
@patak_dev @PMekhaeil @jlengstorf @vite_js @github @Netlify I see that I looked the other way just long enough for my work here to be done.

Well done, me.
*sips martini*
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 9th 2022 replying to this from @_phzn
@_phzn @rachelnabors @jlengstorf Ooooh!
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 9th 2022 replying to this from @rachelnabors
@rachelnabors @jlengstorf \o/
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 9th 2022 replying to this from @jlengstorf
@jlengstorf @rachelnabors Perhaps somewhere like Boxpark in Shoreditch? It has a variety of good food and drink options around some sheltered but airy seating areas.

https://www.boxpark.co.uk/shoreditch/
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 7th 2022 replying to this from @Consulting_LH
@Consulting_LH @smashingconf @neilkuumar Good times!
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 4th 2022
RT @CSSInRealLife: ✨New article for @smashingmag: How to optimise your website’s social media embeds to reduce their environmental impact…
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 4th 2022 replying to this from @jaffathecake
@jaffathecake This from Limmy is :chefkiss:
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 4th 2022 replying to this from @cassiecodes
@cassiecodes Deep.
Sigh.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 3rd 2022 replying to this from @zachleat
@zachleat @DavidDarnes @Netlify Hello?
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify What a rollercoaster!

Behind the scenes Netlify Functions are AWS Lambda. Just with lots of DX workflow sugar. Serverless functions can be very efficient and performant, but much depends on your use case and implementation.

Shame they're not the right fit for your project.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @CodingCatDev
@CodingCatDev @jamstackconf @jlengstorf @maxcell @bencodezen @whitep4nth3r @dsalinasgardon @tolga @trostcodes @BrittneyPostma I'm only helping a bit really :)

https://twitter.com/philhawksworth/status/1488925979812798466
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022
Smarter people than I, are making the new Jamstack Discord receptive and constructive and safe.

I'm very much enjoying being a part of the community as it gets more and more supportive and engaged. https://twitter.com/CodingCatDev/status/1488879773925392384
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify Yeah we're talking about 2 different things at once now. Setting my guess about the port aside, that server logging and response in the browser you describe sound consistent as 404 to me.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify I've had processes in one terminal or IDE window still hang around and keep listening on a port when I thought something else was the only process.

Anyway, odd.

Is your project now free from that legacy netlify-lambda stuff from the old demo? Is it now working as per the docs?
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify Does that not make sense?

If the dev server couldn't resolve the URL to a function it should return a 404 which it sound like what you saw reported in the terminal, and with a default 404 message sent to the browser.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify Oh! Wait, you could see the function requests being handled in the terminal, but not returned in the browser? Did I understand that correctly?
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify Interesting. That change to the functions folder source path should not have made a difference. Changing the dev server port though... Is there a chance you have a another instance running which is serving on that port? (I've done that in other term windows in the past)
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @colbyfayock
@colbyfayock @DavidDarnes @domitriusclark Yeah, I'm with you :)
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @colbyfayock
@colbyfayock @DavidDarnes I must admit that Discord has been a bit of a learning curve for me too. But I'm starting to really appreciate it.

It helps that folks like @domitriusclark are so good at helping people settle in and find their way around.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify Curiouser and curiouser!

I see you've configured where your source functions can be found and that is different to the default (which should all be fine as long as your contact.js function is in that /functions folder) Is that where it lives?
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @philhawksworth
@xJaagrav @Netlify And an easy mistep can be in the default URL for the functions (I made the error myself in the original tweet in this thread!)

Functions are served on this path (note the .) /.netlify/functions/
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @philhawksworth
@xJaagrav @Netlify The page in the docs you linked to covers a lot, so do you mind if I ask what you were trying to achieve?

Was it, to add serverless function to your project? If so:

- add /netlify/functions/hi.js
- deploy or run locally with `netlify dev`
- visit /.netlify/functions/hi.js
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @philhawksworth
@xJaagrav @Netlify and a function like this should return a cheery message:

exports.handler = async function (event, context) {
return {
statusCode: 200,
body: JSON.stringify({ message: "Hello World" }),
};
}
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify Hmm. Interesting. The video tutorial from the community is rather out of date (around 4 years) so it's not the recommended way these days.

I'm keen to figure out where the process in the docs fell down for you. These appear correct, but obvs something is not clear enough.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022 replying to this from @xJaagrav
@xJaagrav @Netlify Oh no! Sorry to hear we've got a gap that caught you out.

1. Can I help?
2. Would you mind sharing what the gap was so I can help improve it?
  • Permalink
  • |
  • Twitter
  • Newest
  • Previous
  • Next
  • Oldest

The source code of this site is available on GitHub and is hosted and updated by Netlify automatically after each code commit

Other than where specified, the content on this site is published under a Creative Commons Attribution 3.0 licence.

Subscribe to a feed of blog posts on this site.