![]() ![]() ![]() Just go with one of your pet project ideas for a website (that ideally has many pages and some dynamic 'chunks' of content you can move around and put together on the backend) Middleware makes things a bit more complicated and there are better resources out there to teach about it than I am able to, but it's really just a thing that runs in between when your Express server receives a request (accepting the same request and response objects), and then either calls a special callback function (typically called next) or errors. So to catch a GET request to /index, you write: app.get("/index", function(request, response) ) There's also app.set() but you use that a few times when you're configuring your Express instance, or copy it from somewhere and basically never think about it again.Īnd that's about it. So the thing about Express is: It doesn't do a whole heck of a lot on its own. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |