We’ll use the bcryptjs and validator packages to prepare for our user saving. We have to update the name fields in our templates as well to get the correct posts. We end with an error, so next flash messages are needed to help us figure out what went wrong! GitHub: github.com/JREAM/learn-node-by-example
We setup Log Rotation rather than standard logging using Node’s built in FileSystem (“fs”), Im using Node 6.9.5. We use another tool to make the logging rotate, after that we setup the two templates for account_delete and account_reactivate. GitHub: github.com/JREAM/learn-node-by-example
This is a long video, learn the hard way and we’ll appreciate more packages later! We start by adding express-session which is middleware that attaches to the route’s ‘req’ variable appearing as ‘req.session’. We then create middleware to prevent unlogged in users from accessing the dashboard. A bit of time is consumed tidying of some […]
I’ll use Handlebars as a template engine rather than Jade/Pug as it is much more common to front-end developers. This is how we set it up with layouts and partials using Handlebars in Express. GitHub: github.com/JREAM/learn-node-by-example
We can save a lot of time by using the Express Framework built for Node. It’s one of the most popular if not the most popular. This is how we install it, run it, and a quick bite of what’s going on. It’s quite simple at first. GitHub: github.com/JREAM/learn-node-by-example
Learn Node JS by Example, we’ll start with installing Node and using NPM for packages. We will run a extremely simple server just to give you an idea of a bare bones server. GitHub: github.com/JREAM/learn-node-by-example
Route parameters are named URL segments that are used to capture the values specified at their position in the URL. The captured values are populated in the req.params object, with the name of the route parameter specified in the path as their respective keys.
Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.ExpressJS is one of the most popular and widely used web frameworks in the Node.js development zone. ExpressJS allows you to handle Routes, Server and I/O stuff very easily.