5 ms·
Show HN: I have a silly pet project, can I get some input?
Last night I had a stupid idea, and wanted to check if it is technically possible. Well, it is!
In a nutshell: Emoji support for your website's URLs.
yourwebsite.com/contact - booring
yourwebsite.com/:phoneemoji: - cool!
So I wrote a nodejs middleware that offers emoji support for your API, with 2 lines of code. (well if you count the installation 3 lines)
Here's the project:
https://www.npmjs.com/package/slashemoji https://www.npmjs.com/package/slashemoji
I currently have support for the /contact and /about routes.
Can you give me some ideas of what other URLs to cover, and what emojis to link the routes to?
- tanmaydesai89 7y agoSharing a demo url would help. pages you can cover: careers/jobs, pricing, status, faqs, blog, terms of service, privacy policy. Hope this helps.
- andreigaspar 7y agoYeh that makes sense, I'll put it on a server. Thanks for the suggestions, these are awesome! I'll add them like this (because I can't use spaces): /careers /jobs /pricing /status /faq /blog /terms /privacy
- tanmaydesai89 7y agoGlad I could help. I had a question though - why not provide a mapping option to slug for better customization. (pardon - my programming knowledge is very limited)
- andreigaspar 7y agoThat is an interesting point, I honestly didn't think about it. The initial thought was to automate everything, so no code has to be written, just a simple import - but this comes at the cost flexibility and customization. I'll try to figure that out as well for 2.0, maybe there's a user friendly way to customize it
- andreigaspar 7y agoSolved the mapping option! Can be mapped with a one-liner now, thanks again for the input!
- swimmadude66 7y agoRather than trying to exhaustively predict all the pages you could ever want, maybe it would be smarter to build this as a middleware. That way you could also support things like post requests, multiple emojis in a path, or paths off of something other than root. Additionally, you could allow your code to accept a mapping of emojis to strings. That way people could use other emojis without hammering you to support them, and the same emoji could be used to represent different strings on different sites. Overall I think its a cool idea, but if I were you I'd be worried about the huge amount of work to extend this functionality as-is if it got popular.
- andreigaspar 7y agoYeh that makes sense, I'll have to come up with a solution for that. I didn't think about it that deeply yet tbh, I just snapped it together as a tongue in cheek project. I'll explore some solutions for scaling and customizing it, thanks!
- andreigaspar 7y agoSolved it! Routes can be associated with simple one liners now. For example: emoji.set(':emojisymbol:', '/whatever/route/here') Thanks again for the input!
- swimmadude66 7y agoAwesome, looking forward to trying it out!
- gitgud 7y agoCool idea, I think it should be mobile only though. Emojis dont show in my chrome browser on PC, as coloured icons that is.
- andreigaspar 7y agoThanks! Well the old routes are still kept intact, so it can be accessed through let's say yoursite.com/contact - but if you choose to use an emoji you get the contact page too :D
- XZz_Yassin 7y agoCool idea, I like it
- andreigaspar 7y agoThanks a lot!
- WheelsAtLarge 7y agoI second that. This is a great way to universalize the standard website footers such as About us, privacy, contact us and sitemap
- andreigaspar 7y agoThat's a pretty creative input, I didn't think about it from the perspective of universalizing these routes. I built it as a tongue in cheek project, but I'm starting to get pretty excited about polishing it.
- andreigaspar 7y agoI created an updated package with the ability to customize your emojis, and implemented it into our site (there are some examples in the description): https://www.npmjs.com/package/emoji-express https://www.npmjs.com/package/emoji-express
- tonteldoos 7y agoScratched an itch, simple idea, elegant implementation, and useful! I love it :)
- andreigaspar 7y agoThanks I'm really glad to hear that!