Make the friendly-words project boosted

Hello, I would love it if the Glitch staff made the friendly-words project a boosted app, I would love to use it as an API.

4 Likes

If Glitch does not boost it, I could make a serverless function on vercel or something like that

2 Likes

Yeah, you could use the friendly-words npm package.

Here you go @RiversideRocks
This was my first time using netlify functions :slight_smile:
https://friendlywords.eddiestech.co.uk/.netlify/functions/words/endpoint-name
e.g.
https://friendlywords.eddiestech.co.uk/.netlify/functions/words/word-pairs
(alternative url: friendlywords.netlify.app)
Hope this helps you!
Eddie

3 Likes

Ah, you beat me to it! Nevertheless, I’ll create one using Vercel.

2 Likes

I kind of wanted a challenge anyway so that’s why I did it.

2 Likes

I actually finished and I was about to write the README when I saw this :joy: :cry:

2 Likes

Image uploaded using @EddiesTech’s words:

https://cdn.riverside.rocks/a/stupendous-jackrabbit-shocking-heath-nifty-cap.png

2 Likes

Anyway, here’s my version:

Maybe everytime @RiversideRocks wants to generate names, he can do a coinflip (using code :joy:) and if it’s 0, the words are fetched from @EddiesTech’s API else if it’s 1, from mine.

3 Likes

I’d consider :laughing:

2 Likes

I like yours better. It has a choice for the no. of results. Mine was kinda throw away quick code
Here’s the code I used (I remixed the glitch project, exported it to GitHub, added the Netlify files to it using GitHub and deployed with netlify. I didn’t even remove the server.js)

1 Like

Well it’s really not bad for someone who’s using Netlify functions for the first time. Plus, it was my first time using Typescript, so I bet Typescript coders might faint by looking at my code.

1 Like

One thing I like about your version is that all the stuff happens in one file which makes it short, lighter and easier!

1 Like

Any competent coder would probably report my spaghetti code! :joy:

2 Likes

Switch statements :flushed:

1 Like

Funnily enough, we both took pieces of code from https://glitch.com/~friendly-words! :laughing:

1 Like

Definitely not copy-paste from this guy’s GitHub and the original Glitch project :joy:

(https://github.com/LearnWebCode/youtube-heroku-netlify/blob/main/02-netlify/my_functions/animal.js)

2 Likes

And I’ll create one with CloudFlare workers

4 Likes

https://friendly-words-boosted.glitch.me
I remixed and boosted the project.

3 Likes