📜  graphql install - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:31:03.826000             🧑  作者: Mango

GraphQL Install - Shell/Bash

In this guide, I will describe the steps to install GraphQL using Shell or Bash commands.

Prerequisites
  • Shell or Bash environment
  • Node.js and npm installed (version 6 or higher)
Steps
  1. Open your terminal application.
  2. Navigate to your project directory.
cd <path-to-project-directory>
  1. Run the following command to install GraphQL and its dependencies:
npm install graphql express-graphql
  1. If you are using MongoDB, install the MongoDB driver as well:
npm install mongodb
  1. Confirm that the installation was successful by checking the installed packages:
npm ls graphql express-graphql mongodb

This should display a list of the installed packages, including the version number.

Conclusion

By following the above steps, you have successfully installed GraphQL and its dependencies using Shell or Bash commands. Now, you are ready to create your first GraphQL schema and start building your API. Happy coding!