• hawksworx
  • blog
  • speaking
  • about
  • search

Notes - page 1017

  • 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 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
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 2nd 2022
RT @brucel: One week left to save the Web! https://brucelawson.co.uk/2022/one-week-left-to-save-the-web/ - the CMA consultation on mobile ecosystems closes 7 Feb. Want browser c…
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 1st 2022 replying to this from @maverism
@maverism @DavidDarnes @Netlify It was all me!
(Except for all of it)
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 1st 2022 replying to this from @DavidDarnes
@DavidDarnes @Netlify I hope this turnaround time was agreeable
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 1st 2022 replying to this from @dthyresson
@dthyresson @Netlify @skn0tt Hard same! 🎉
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 1st 2022 replying to this from @SteveALee
@SteveALee I have EXCELLENT news

https://github.com/netlify/labs/blob/main/features/scheduled-functions/documentation/README.md#writing-a-scheduled-function
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 1st 2022 replying to this from @ilikescience
@ilikescience repeatedly ....but in a timely fashion
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • February 1st 2022
✨YES!✨
Keeping quiet about this one has been hard!

CRON, anyone?! https://twitter.com/Netlify/status/1488547393226293254
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • January 31st 2022 replying to this from @galvogalvo
@galvogalvo @loopdream @ndmccormack You found the right audience!
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • January 31st 2022 replying to this from @banaan666
@banaan666 Yeah, I've been ignoring the cease and desists from Alpha Centuri for a while too.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • January 30th 2022 replying to this from @kmelve
@kmelve Agreed.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • January 30th 2022
Pretty miffed about this.

I was planning on using Pinkalot to paint the acre of moon that a certificate says I own.

This might cost me a fortune now. https://twitter.com/colordotmuseum/status/1487349171367596038
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • January 30th 2022 replying to this from @kmelve
@kmelve Markdown files are excellent… for a while… and depending very much on the site.

But after that time, content available as structured data that you can query when you need it is a wonderful thing! 😍
  • 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.