- Hands-On Full-Stack Web Development with GraphQL and React
- Sebastian Grebe
- 198字
- 2021-07-02 13:20:44
Node.js and Express.js
One primary goal of this book is to set up a GraphQL API, which is then consumed by our React front end. To accept network requests (especially GraphQL requests), we are going to set up a Node.js web server.
The most significant competitors in the Node.js web server area are Express.js, Koa, and Hapi. In this book, we are going to use Express.js. Most tutorials and articles about Apollo rely on it.
Express.js is also the most used Node.js web server out there and explains itself as a Node.js web framework, offering all the main features needed to build web applications.
Installing Express.js is pretty easy. We can use npm in the same way as in the first chapter:
npm install --save express
This command adds the latest version of Express to package.json.
In the first chapter, we created all JavaScript files directly in the src/client folder. Now, let's create a separate folder for our server-side code. This separation gives us a tidy directory structure. We will create the folder with the following command:
mkdir src/server
We can now continue with the configuration of Express.js.
- 廣電5G從入門到精通
- 物聯網網絡安全及應用
- 網絡創新指數研究
- Oracle SOA Suite 11g Performance Tuning Cookbook
- Hands-On Full Stack Development with Spring Boot 2 and React(Second Edition)
- 區塊鏈輕松上手:原理、源碼、搭建與應用
- Working with Legacy Systems
- 物聯網場景設計與開發(初級)
- INSTANT LinkedIn Customization How-to
- 云工廠:開啟中國制造云時代
- 全聯網標識服務
- 工業以太網技術:AFDX/TTE網絡原理、接口、互連與安全
- 走近2050:注意力、互聯網與人工智能
- 巧學活用CISCO網絡典型配置
- 5G智聯萬物:輕松讀懂5G應用與智能未來