Let's first create a web server using Node.js, which we will use to create endpoints later on to access our graph-based applications:
- The first step is to create your application's project folder; to do so, run the following command from the Terminal:
mkdir <project-name>
- Then, to initialize a Node.js project, run the init command in the root folder of your project. This will prompt a series of questions to generate the package.json file. You can fill out the answers you want or just click on return to accept default values for the prompts:
cd <project-name> npm init
- Next, since we want to create a web server, we will use express, which is a very powerful and popular framework available for Node.js.