3 ms·
Show HN: Mini social network that I made as my first MERN stack project
- misa012 7y agoDemo: https://social-network.site/login https://social-network.site/login Video of app: https://streamable.com/5srsv https://streamable.com/5srsv
- cvaidya1986 7y agoCongratulations on launching!
- misa012 7y agothanks!!
- philipkiely 7y agoWhat stacks have you used before MERN, and how did the developer experience for MERN compare to those other tools?
- misa012 7y agoI havent bult anything before this. Just some small programs in node js.
- dfee 7y agoMERN => Mongo, Express, React, NodeJS. Which is an evolution (as far as I can tell on) MEAN => Mongo, Express, Angular, NodeJS. But really, NodeJS is unnecessary in the acronym, but is used to make a backronym. Really - how do you run Express without NodeJS? Maybe it’s so the backronym wasn’t “MAN”.
- yepthatsreality 7y agoAlso interesting in comparison to older forms of this style of stack description: * LAMP - Linux Apache MySQL PHP/Python/Perl * LEPP - Linux Nginx PostgreSQL PHP/Python/Perl MEAN and MERN do not specify the OS and swap more open ended possibilities for specific frameworks. I guess LEMJ doesn't roll off the tongue very well. And while this was submitted with MERN in the title, the README omits Express but mentions Socket.io.
- hombre_fatal 7y agoInstead of just validating the extension of the user-uploaded image, you can also determine the image type by looking at the first two bytes of the file. https://github.com/sdsykes/fastimage/blob/bad902712c146d9fc84d34f419d31a934e8dc0eb/lib/fastimage.rb#L477-L486 https://github.com/sdsykes/fastimage/blob/bad902712c146d9fc8... It's also nice to move those database calls into a db.js module. That way you can reuse them. And it cleans up the route handlers to just business logic. I didn't read enough code to have any more advice.
- SahAssar 7y agoIf I might ask: why use MongoDB when the data very relational?
- misa012 7y agoMy first project so I had no idea what DB to use
- jgalentine007 7y agoCool. I noticed the client service methods seem to repeat a lot of the same code / pattern, there is probably a way to simplify it.
- stephenmc 7y agoGreat domain name!
- misa012 7y agoThanks!!