- 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.
推薦閱讀
- 微商之道
- 社交電商運(yùn)營(yíng)策略、技巧與實(shí)操
- 物聯(lián)網(wǎng)信息安全
- 信息通信網(wǎng)絡(luò)建設(shè)安全管理概要2
- 企業(yè)私有云建設(shè)指南
- 計(jì)算機(jī)網(wǎng)絡(luò)與通信(第2版)
- 雷達(dá)饋線(xiàn)技術(shù)
- OMNeT++與網(wǎng)絡(luò)仿真
- 4G小基站系統(tǒng)原理、組網(wǎng)及應(yīng)用
- 高級(jí)網(wǎng)絡(luò)技術(shù)
- 深入理解Nginx:模塊開(kāi)發(fā)與架構(gòu)解析
- 移動(dòng)物聯(lián)網(wǎng):商業(yè)模式+案例分析+應(yīng)用實(shí)戰(zhàn)
- 云工廠(chǎng):開(kāi)啟中國(guó)制造云時(shí)代
- 路由與交換技術(shù)
- 視聽(tīng)變革:廣電的新媒體戰(zhàn)略