-
Creating server and Dynamic Routing in Express for starters
Here’s the code syntax for dynamic routing and server creation in express JS : Here’re the steps involved:
-
Dynamic Routing – Handling User Request in Vanilla NodeJS
Here’s a simple example of how you can dynamically route a server in pure vanilla NodeJS without any packages : Steps :
-
Important NPM packages you’ll need to build complex backends with NodeJS
Whether you’re learning backend development (with nodeJS) or trying to build complex back-end while using NodeJS, keep a note of the following NPM packages. You might need all or many of them in you backend development journey. Here they are: Express JS Express is a powerful and flexible web framework for NodeJS. It’s designed to…
-
How to create and run your very first simple HTTP server in NodeJS?
The first thing to do is to create a JS file inside your code editor. Next we write the following codes : In the above code we’ve imported the HTTP Module which is required for creating the server. In the following steps, let’s write some more codes : In the above code block we’ve used…
-
How to Read and Write files using NodeJS?
First import the build-in file system module like so : Synchronous Way Now, in order to use the fs (file-system) module to read a file, use the following code syntax : Now if you log the file above to the console, it will read and display the suitable file. Let’s now say you want to…
-
Getting started with NodeJS REPL
First go to the NodeJS website and download a suitable version of NodeJS on your system. I would recommend you use an LTS version in order to keep getting long term support and updates. Next, test whether you’ve NodeJS installed on your system by running the following terminal commands : To type and run node…
-
What is NodeJS and why should you use it as a JavaScript developer?
NodeJS is a JavaScript runtime environment which is built on the Google’s open-source V8 JavaScript engine. Now, what does that actually mean? Let’s explain… Any browser would understand HTML, CSS and JavaScript on the front-end. Whatever you write, whether it’s pure JavaScript or any of it’s libraries or frameworks like bootstrap, React or Angular, it’s…
-
What is nodemon? How to use nodemon with NodeJS?
Nodemon is a very useful tool available on the NPM registry which helps us write node applications by automatically restarting the apps when any of the NodeJS file’s source code is changed i.e., whenever we edit or rewrite the source code as a developer. How it’s done, you ask? Just by replacing the node terminal…