Express Send

The express send, or res.send method can be used to send a string or object when it comes to making very simple basic express middleware methods that respond to incoming client requests. It is not always the best tool for the job though and in some situations it should at least be used in conjunction with other express app.methods. So this will be a quick post on the res.send method, and related topics.

Read More

Express Middleware Example Read and Write to a file

In this post I thought I would focus on application level middleware specifically when working with expressjs as a server side framework in nodejs. In other words the middleware that I myself make, for a specific application, rather than just using what is built into express itself.

So there is a lot to write about concerning express middleware, I have all ready covered the basics of middleware in express in a previous post and I have a post on express middleware in general that is serving as a central point for this topic.

Read More

Express Middleware Example Read and Write to a file

maybe one of the best ways to learn about the value of express middleware is to just start developing example after example in which one uses express middleware to accomplish all kids of tasks. So this post will be one of several posts on express middleware examples. Today in this post I will be going over a very simple example of router level middleware that just reads and writes to a file. It will also involve a very basic client system that exists as some static files hosted via express.static.

Read More

Express Middleware Example Keyword Viewer App

In this post I will be writing about an app I have made that is an example of express middleware in action. I have wrote a main post on express middleware in which I explore the subject in general, as well as another post in which I cover just the very basics of this topic as well. However this post will be one of several posts in which I demonstrate the usefulness of express middleware, mainly when it comes to writing your own to accomplish whatever needs to get done server side.

Read More

Express Middleware Basics

In express.js the concept of middleware is something that should be grasped in order to make significant headway with express applications. If you have fiddled around with express a little so far, chances are you have used some middleware so far without even realizing it. There is some express built in middleware, one example if this would be the express.js body parser, but for the most part express itself is fairly minimal. So as such creating a fairly capable express.js application will involve installing additional middleware, as well as writing original middleware functions. So then in this post I will be covering express middleware basics.

Read More