![]() ![]() When you want to execute your application (or in this instance, the server that you’re about to build), you’ll have to execute the index.js file using the following command: node index. This field stores the entry point to your application, which is “index.js” in the example above. Look back at the package.json file above and you’ll see a “main” field. However, if you want to keep the default values you can simply use the following command instead: The package name, version, entry point, and license fields all have default values that you can easily override by providing your values. The first thing you’ll need to do is create a package.json file (within your project directory/folder) using the following command: npm initĮxecuting the command above will initiate a process that’ll prompt you for the following inputs: This is a straightforward process that requires NodeJS and npm. Installing Express in Your Projectīefore you can use the Express framework, you’ll need to install it in your project directory. In this tutorial, you’ll learn how and why you should use Express in your own projects. One of the remarkable things about Express is that it gives developers complete control over the requests and responses that are associated with each of its app’s methods. The Express framework builds APIs that facilitate communication through HTTP requests and responses.
0 Comments
Leave a Reply. |