Tuesday 24 September 2019

Setting up a website, I have some questions...

So I've been doing some research on setting up websites in Node.js and it seems that Express is a pretty good one to use, it even has that express-generate command that sets up a basic project to start from.Now, I'm no stranger to frontend web development. I know my way around HTML/JS/CSS and part of what draws me to Node is that I already know Javascript.I ran `express-generate` and use hbs as the templating engine since it's very close to HTML and it makes a lot of sense to me, and I also set it to use SASS instead of CSS. It runs, it's all good and all, but my research has only opened up more questions.It seems like there is always a "You should use ___!" around every corner. I plan on having a database connection on my site, and I know MySQL. So I look at getting that on there, and after installing mysql apparently there is a faster and better mysql 2 I should use. Not only that, but I should use something like Knex to build the database queries. In fact, I should use an ORM so I should use something like Sequelize but recently people said Objection is way better than Sequelize and to use that instead. Even so, this article says I shouldn't use an ORM. After looking into this, I found out that the default hbs that express comes with has a vulnerability, and that I should instead use something like express-hbs, or better yet, express-handlebars, for my templating engine. I also want to get Bootstrap working in my site, so I could use a CDN or as some people suggest I should use `npm install bootstrap` but while I'm at it apparently webpack is another one to use to put resources together, but in order for some of it to compile together I should add Gulp to the mix? What about Babel, Browserify, jspm, Grunt, Yeoman, or Slush? This is confusing borderline intimidating...I spent a week adding things, reading things, trying things, resetting my project, going back and testing things, and comparing things. I'm currently using express, express-handlebars, and objection (ORM) with mysql2.Before I go any further in reading and considering extra stuff, I figured there's no harm in reaching out and asking for help r/node please help me out.First off, are there any packages that I should know about that I had not already mentioned? I'm somewhat new to this, so please just assume I know very little.Secondly, I feel like there are many rabbit holes that I could hall in and I don't know what paths I should be taking. I'm scared that if I ignore these extra packages and options I will regret them down the road, but I'm also scared that they're absolutely not mandatory and adding them to my project will just make things harder and will end up being a fat a waste of time. Could you please give me advice on this?EDIT: I did some reading and found this fun read and now I can relate to all the confusion.

Submitted September 25, 2019 at 06:19AM by stevenr4

No comments:

Post a Comment