Skip to main content

29 posts tagged with "Express"

View All Tags

A final recap of the Frosty CMS project, features, screenshots etc.

Flash messages notify the user about various things as they interact with the application. For example if a login failed, why it failed.

Implementing image uploads in Frosty CMS using Multer and Cloudinary.

Creating nested REST routes to edit and delete comments. Restricting access to routes based on user role.

Middleware functions can be refactored into their own module to DRY up routes.

Creating four user roles with varying permissions and abilities in Frosty CMS

Checking if user is authorized to edit content by comparing user ID to author ID. Creating middleware function, and dynamic GUI controls based on ID.

Associating users with comments by modifying the Mongoose Schema to include author ID's

Refactoring Express routes into separate modules for organizational purposes, using the Express Router middleware

Implementing user authentication in an Express application using Passport JS. Setting up login and registration forms, authentication routes, and template modification based on authentication.

Using blog ID to populate comments and displaying them on the page with a loop.

Seeding is when we wipe the database and then add a set of filler data, which makes it easy to test when we are making changes. Itโ€™s sort of like Lorem Ipsum, for the database.

Anytime a user can input text data we have to sanitize the input so that they don't inject anything malicious, like a script to drop the database. This is how we sanitize inputs in Express.

Rounding out the UD portion of CRUD for our blog posts in Frosty CMS.

Adding dates to blog posts using Mongoose template and .toDateString. No MomentJS in this method.

Creating the single post blog page template. Dynamically linking to single posts from index page.

RESTful routes is a conventional pattern to follow when structuring different routes for interacting with the server whenever an HTTP request is made by the client.

The process of saving blog post data to the database by submitting it with a form.

Populating post templates with static content from MongoDB.

Setting up a MongoDB database on a Node server and using Mongoose to interact with that database.