Problem I took some time to try and solve a problem. I am building a basic Node + Express API. […]
Tag: express.js
Finding multiple documents
Problem I wrote a Mongoose Node/Express application. I have 4 documents. I am trying to write a route (end point) […]
Delivering realtime data from backend socket
Problem I’ve got server running to make serial data available on a TCP/IP port. My goal is to collect data […]
A JavaScript class, which finalises the HTML of each page of my NodeJS (Express) website
Problem Background A request (req in the code) is made to my server, and a response (res) returned. By the […]
User authentication using Passport
Problem I’m currently building a Node/Express app using Passport for user authentication and Sequelize for database queries. It’s a ‘To-do […]
Express.js and jsonplaceholder application
Problem I have put together a small node application with Express.js and jsonplaceholder. On the homepage, it displays posts by […]
Parameterized route
Problem Is this approach considered good practice, or should I create separate router.delete functions for all my routes? Please, explain […]
Allowing users to view and manage articles
Problem This is a controller from an Express app that lets users view and manage articles. There are at least […]
Exiting a Promise early
Problem I’m using a Promise chain to write some data to a file, execute a command on it, inspect its […]
Role based permissions in Express.js
Problem This is something I’ve done a few times, but I’ve found it to feel a bit error-prone with so […]