- Hands-On Full-Stack Web Development with GraphQL and React
- Sebastian Grebe
- 79字
- 2021-07-02 13:20:45
Installing important middleware
For our application, we have already used one built-in Express.js middleware: express.static. Throughout this book, we continue to install further middleware:
npm install --save compression cors helmet
Now, execute the import statement on the new packages inside the server index.js file so that all dependencies are available within the file:
import helmet from 'helmet';
import cors from 'cors';
import compress from 'compression';
Let's see what these packages do and how we can use them.
推薦閱讀
- Web安全防護指南:基礎篇
- Aptana Studio Beginner's Guide
- Hands-On Chatbots and Conversational UI Development
- Go Web Scraping Quick Start Guide
- Spring Cloud微服務架構進階
- PLC、現場總線及工業網絡實用技術速成
- IPv6網絡切片:使能千行百業新體驗
- 紅藍攻防:構建實戰化網絡安全防御體系
- 端到端QoS網絡設計
- 人際網絡
- 計算機通信網絡安全
- RestKit for iOS
- Learning IoT with Particle Photon and Electron
- OpenShift Cookbook
- 智能家庭網絡:技術、標準與應用實踐