Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "ejs"
-
Javascript is McDonald's.
1) everyone says they hate it....but they just keep going back.
2) very few people admit they keep gong back...
3) When McDonald's started doing salads, dressing nice, and delivering to tables it seemed a little much, you're a burger place. A few years later I'm writing my app in react JS, serving up eJS templates with my NodeJS server, running off a NOSQL JSon database, and munching down a Greek salad from McD's.
4) you start your burger (project) with high hopes. As you eat though....you start to regret it, but oh well, you're halfway in. By the end, never again, last time. A little while later, npm asks you if you'd like fries with that.
Feel free to disagree or add more!12 -
Grunt, gulp, bower, webpack, rollup, yarn, npm, requirejs, commonjs, browserify, brunch, rollup, parcel, fusebox, babel,
wrappers for bundlers, frameworks on frameworks, then for css, theres scss, sass, less, stylus, compass, and for templates, handlebars, mustache, nunjucks, underscore, ejs, pug, jade, and about five billion other word-salad tools, all with their own CLIs, each in some way building on npm, but with their own non-congruent little syntax, like no one realized they were reinventing the same problems introduced by domain specific languages, most happy to announce "configuration takes a little time, but it's worth it!"
No, it's not. Just stop people. Just stop. You're not doing anyone any favors by creating another lib, all you're doing is tooting your own horn and self promoting. Use what exists and stop creating more shit for new people to learn, to add to the giant clusterfuck that is the 2019 hotmess known as "web development."
You're not special. You're not important. You're lib or tool will be famous for 15 minutes and no one cares what you've made.
If you want to contribute to web development, do us all a favor and contribute to global sanity by kindly deleting your contribution and any plans to contribute new solutions to problems that have already been solved.18 -
When you use yourself as a rubber duck and you realize how much of a dumbfuck you are...
Fuck me, I was using a variable called staticHTML in ejs template. But when passing the variable, I was using staticHtml.
Goddamn7 -
I hate these idiots that post source code examples as an image just so they can keep their cool highlighting and style. How the fuck am I supposed to test that without re-typing the whole thing myself? Ever try OCR on source code? Not too great, is it.12
-
Just wrote my own webpack plugin for VueJS.
In serverless application there isn't a good way to pre render a single page web application as there is no server to do this task.
What we can do is use serverside rendering with webpack to locally (or in CI) generate the static HTML markup and include them in a template file like EJS.
In that way, the client browsers would not have to wait for the initial render and the search engines will also be happy.
This feels good! Time to upload it as a npm package 😇2 -
Fucking windows automatic reboots! They seriously need to fuck off with that. As of this morning I have a finance person who can't log on, a floor manager that can't schedule his employees and a robotics controller pc that rebooted and didn't save the changes I made! Seriously, FUCK OFF!14
-
Not much of a haxk, just a stupid thing that works.
In my hs videogame programming class, the teacher has this program called LANSchool (most of you have heard of it) which he used to restrict apps/browsers to the point of uselessness . He didn't (and still doesn't) know anything about the stuff he 'teaches', most is tought by TAs.
Here's the dumb part: he WHITELISTED APPS. A friend, one of the TAs, figured out that if you rename something 'Google Chrome', lanschool wouldn't care. So I got Chromium (for unblocked internet) and switched its blue icons in the exe for original chrome icons, then renamed it 'Google Chrime'. Woo.
LANSchool is such a bad program (you can even unblock a site by spamming the F key for refresh).
The teacher did, and still does, treat the TAs like trash. He's a babysitter while students listen to online vids and the TAs.2 -
Whenever I see a website ask
1. Accept all cookies
2. Customize selection
I can see what they're really saying...
1. Accept! and I'll fuck off out of your way and let you read.
2. So you wanna read the content heh? Step into our office. Ok then, lets go through them one-by-one and you can explain to me why you think you don't need that cookie. and then MAYBE we'll fuck off our of your face so you can read the scant few lines of text standing between you and finishing your homework/job/whatever.18 -
I am making my first dashboard/summary page without a tutorial! Once I learn D3 via a Udemy course, this will be 93% done!
I just want want to see what you guys think?
Some text is removed as I shared it on FB and the business I am making it for is following me and they have NO idea that I am doing it for them.5 -
Working continuously on a task for like 3 hrs, cant get it done
*goes out, mind refreshed and completes the same task in 5 mins*1 -
Dear everyone,
Stop turning off the monitors. That doesn't sign you out or turn off the computer, it just makes the next person wonder what's taking so long.1 -
Even seniors make mistakes. In case you were ever doubting yourself - just remember that.
I just had a very senior level programmer on my staff add a function to a production system that issues an SQL UPDATE query without a WHERE clause. Fortunately, only the 1st entry succeeded and the rest failed due to "duplicate record" errors. Clearly he had intended to do a SELECT to check if an entry was present. If it was present, do an UPDATE, otherwise do an INSERT (think UPSERT - but done manually). However instead in the insert part they were both UPDATE's. The first update was normal looking but the second UPDATE was just this weird malformed-looking thing where he tried to do an UPDATE but to every field including the key fields. Clearly he was thinking about an insert but actually writing it as an update. Every now and then I need to remind myself that these things happen. The guy's not dumb - just made a mistake.
I'm just happy it "failed unsuccessfully".4 -
I always had this mentality that I shouldn’t rely on a certain library or framework for my entire project because what if one day they stop supporting it. (Yeah I’m talking to u vuetify) That’s why I came up with this code structure that for everything that I wanna do I have a ‘driver’ library all coded by myself that interacts with that third party framework or library so if they stop supporting it I could just change a couple of lines of code in my driver file and my codebase should be working again. But I feel like this ‘driver’ approach is not the most efficient way of going in terms of memory usage. Do you guys think I should keep it simple and directly use those libraries or this is actually not a bad approach.7
-
!rant
Got my new pc up and running, asrock x370 killer sli/ac mobo, ryzen 2200g cpu and radeon rx550 with 12g ram (don't ask). Nothing fancy but sure beats my old am2 system! New pc is so quiet :D9 -
Finally started to learn Node.js and actually set up a small server with node and express and ejs, it honestly works nice but requires so many small things that take a bit to set up, while an apache server running PHP and Mysql would take me 5 minutes max to set up, but either way still trying to make that transition.5
-
Plans for 2019 are to release two products.
1. A text-based strategy game engine that will act as the core of two or more progressive web applications, using Node.js/Express, EJS, and SCSS. It will be proprietary, subscription-based, and playable 24/7 online or offline as a web site or mobile app with nightly/weekly/monthly events and items (think KoL, on steroids, with butter on top.)
I am currently undecided whether to go with MongoDB, MySQL or PostgreSQL, so any feedback - without derailing the other choices, and understanding that it needs to be minimal at first with the ability to expand to millions of users - would be appreciated.
2. I'm sculpting collectors figurines of guinea pigs, molding, casting and then selling a limited set that are hand-painted by me with a certificate of authenticity, as well as marketing blank versions of each with a choice of three colors (including white, and either red or black for eyes - a total of five) for people to either paint by themselves, family members, or friends.
This will also have a website that allows you to choose the breed and colors (changing the picture according to your choices), as well as allowing people to use it as a social media outlet - as if their own guinea pigs had profiles instead of humans. It's also planned to support rescues worldwide and educate folks about properly caring for cavies.4 -
Anybody else really annoyed at all these people getting mad at zuckerburg? Like, I've always questioned privacy of the internet in general. If you're dumb enough to put sensitive info on the internet (especially on social media) then you shouldn't have the right to complain about privacy. It's your responsibility to protect your information.3
-
Diving balls deep into Reactive Native + Electron after close to a year hammering away like clockwork with Python(everything), Flutter/Dart, EJS/JS/jQuery/Node makes me feel like my manhood has left hahahaha
-
Fuck google's link hijacking!
If you don't like it, go into devtools and type:
rwt = null;
-- You're welcome.7 -
What's the general Software Engineering rule of thumb again for frontend templating code?
If I look at certain websites, I notice some code smells in PHP such as:
$.modal = <?php echo $(base)["username"] != 'me' ?' ': echo 'style="display=none"' ?>
or just in general places in the code where PHP gets used as a templating engine for gluing together pieces of HTML code based on conditionals spread out over the codebase and the database itself too. To make things worse, this carries over to JavaScript ajax functions. As a developer, this to me just seems like spaghetticode.
On the other hand, many popular frameworks properly do templating, such as EJS, containing templating in one place and not mixing it with logic too much but just having simple output like <%= %>.
I know I've seen frameworks like Angular 1 contain pieces of HTML into directives, but maybe that's something different, more 'OO'-simulating or cleaner.3 -
Anyone else get janky scrolling when reading the comments on a rant? I don't know what kinda funky thing they tried to do with the scrolling but it always strongly resists me scrolling down the page.
Anyways, I have to do this in the DevTools console to stop it:
document.body.innerHTML = document.body.innerHTML.replaceAll('scroll','');4 -
What's harder than debugging an uncaught exception in a view
If only debuggers like vs can attach to the server side logic of the views -
How to separately host the backend and the frontend ???
I have express API repository which is currently hosted in Heroku along with its documentation site written in ejs.
But now I'm planning on separating the docs website with gatsby and moving it into another repo and hosting it on netlify while the API service still remains in Heroku.
Here is the end goal :
"/" : the docs website.(netlify)
"/api" : the API services.(heroku)
Can someone help me with how to implement this in the actual application?3