35

I was asked to help with the website of this one club. Their 'IT head' is a business person. I told them no, but they sent me something anyways.

They sent me a zip file of their code
instead of giving me access to their GitHub repo. I then realized that they were using 3-year-old NodeJS and Express to power their static website and doing blog posts as JavaScript modules.

A second part of their architecture which was related to member sign up was horribly broken and also written in Node. I found out that they hard coded credentials to their Google Apps account, despite having the setup to pass it via environment variables.

And now they are worried that their sign up isn't working. Their developer resigned.

They want me to help them fix it within a very small timeframe. So they can use the code to collect membership fees.

This is what happens when you have business people develop code.

Comments
  • 3
    Brr, the stuff starting on line 12 gave me shivers. Hand-written HTML????
  • 2
    Are they not using a template engine like handlebars or ejs or jade....content with HTML in routes will end up thousands of lines 😱😱😱
  • 0
    @morpheous the the entire project seems to be split in two parts, one for signup and one for their 'blog'.

    As far as I can ses they're not using any templating engine. They just have one .js file per page, generating the static output you can see in the screenshot. These files are then registered as routes individually in an index file.

    At least in the blog part, everything is just static content, nothing fetched from a database, nothing generated dynamically.

    I have no idea why they use NodeJS for this in the first place, when probably any off-the-shelf static page generator would be able to do this more efficiently.
  • 1
    @tkw01536 I think they opted for nodejs might be they are building this site with the frontend developer who have knowledge on JavaScript and ecma6 scripting instead hiring a new developer and consolidating on what platform they need to end up the blog site which is more a time taking job for them when they have requirement to go live next day 😜😜
  • 0
    May I know what theme are you using?
  • 1
    @m1ks On the editor? That's atoms default "one dark" theme.
Add Comment