[{"content":"When you’re faced with deploying a web application, you’ll find yourself considering where to host it. You’ll want to consider how to monitor your application and keep it running. You may also wonder what you can do to make it as fast as possible. In this article, you’ll get an overview of how to address these concerns for your Node web application.\n1. Hosting Node applications Most web application developers are familiar with PHP-based applications. When an Apache server with PHP support gets …","date":"2023-05-24","permalink":"/posts/deploying-nodejs/","summary":"When you’re faced with deploying a web application, you’ll find yourself considering where to host it. You’ll want to consider how to monitor your application and keep it running. You may also wonder …","tags":["Node JS"],"title":"Deploying node applications and maintaining uptime"},{"content":"In this section you’ll learn how to\nHandle submitted form fields Handle uploaded files using formidable Calculate upload progress in real time Handling submitted form fields\nTypically two Content-Type values are associated with form submission requests:\napplication/x-www-form-urlencoded—The default for HTML forms multipart/form-data—Used when the form contains files, or non-ASCII or binary data In this section, you’ll rewrite the to-do list application from the previous section to utilize a form …","date":"2021-02-04","permalink":"/posts/accepting-user-input-from-forms/","summary":"In this section you’ll learn how to\nHandle submitted form fields Handle uploaded files using formidable Calculate upload progress in real time Handling submitted form fields\nTypically two Content-Type …","tags":["Node JS"],"title":"Accepting user input from forms"},{"content":"By convention, HTTP verbs, such as GET, POST, PUT, and DELETE, are mapped to retrieving, creating, updating, and removing the resources specified by the URL. RESTful web services have gained in popularity because they’re simple to utilize and implement in comparison to protocols such as the Simple Object Access Protocol (SOAP).\nWe\u0026#39;ll use cURL (http://curl.haxx.se/download.html) in place of a web browser to interact with our web service.\nTo create a compliant REST server, you need to implement …","date":"2021-02-04","permalink":"/posts/rest-api/","summary":"By convention, HTTP verbs, such as GET, POST, PUT, and DELETE, are mapped to retrieving, creating, updating, and removing the resources specified by the URL. RESTful web services have gained in …","tags":["Express JS","Graphql","PostgreSQL"],"title":"Building a RESTful web service"},{"content":"To sart here are some advantages of using graphql:\nAvoids having to create many routes to handle everything Avoids over-fetching and under-fetching data This works concurrently with API routes so the server can still be RESTful Install devDependencies\nnpm init -y\nnpm install @babel/core @babel/node @babel/preset-env nodemon --save-dev\nSetting Up the Express server\nFirst thing to do is install express and make an index.js file\nnpm install express\nThis server will be using the Hello World! example …","date":"2021-02-04","permalink":"/posts/express-js-intro/","summary":"To sart here are some advantages of using graphql:\nAvoids having to create many routes to handle everything Avoids over-fetching and under-fetching data This works concurrently with API routes so the …","tags":["Express JS","Graphql","PostgreSQL"],"title":"How to Setup a GraphQL, Express and postgreSQL Server"},{"content":"In this section you’ll learn how to secure you application with https\nIf you’d like to take advantage of HTTPS in your Node application, the first step is getting a private key and a certificate. The private key is, essentially, a “secret” needed to decrypt data sent between the server and client. The private key is kept in a file on the server in a place where it can’t be easily accessed by untrusted users. In this section, you’ll generate what’s called a self-signed certificate. These kinds of …","date":"2021-02-04","permalink":"/posts/securing-app-with-https/","summary":"In this section you’ll learn how to secure you application with https\nIf you’d like to take advantage of HTTPS in your Node application, the first step is getting a private key and a certificate. The …","tags":["Node JS"],"title":"Securing your application with HTTPS"},{"content":"In this section you’ll learn how to\nCreate a simple static file server Optimize the data transfer with pipe() Handle user and filesystem errors by setting the status code. Let’s start by creating a basic HTTP server for serving static assets.\nCreating a static server\nTraditional HTTP servers like Apache and IIS are first and foremost file servers. You might currently have one of these file servers running on an old website, and moving it over to Node, replicating this basic functionality, is an …","date":"2021-02-04","permalink":"/posts/serving-static-files/","summary":"In this section you’ll learn how to\nCreate a simple static file server Optimize the data transfer with pipe() Handle user and filesystem errors by setting the status code. Let’s start by creating a …","tags":["Node JS"],"title":"Serving static files"}]