{"repo":"shibukawa/shadow-fetch","free":true,"listed":false,"github":"https://github.com/shibukawa/shadow-fetch","clone":"git clone https://github.com/shibukawa/shadow-fetch.git","description":"Accelerator for SSR","language":"JavaScript","stars":17,"topics":["javascript","javascript-library","fetch","server-side-rendering","nextjs","expressjs","nodejs"],"license":"MIT","category":"productivity","readme_excerpt":"shadow-fetch Accelorator of Server Side Rendering (and unit tests). Next.js and Nuxt.js and some framework improves productivity of development. You just write code once, the code run on the server and the client. Almost all part or code is compatible including server access code. Next.js's documents uses isomorphic-unfetch and Nuxt.js's document uses Axios. They are both excellent isomorphic libraries, but they make actual packet even if the client and the server work on the same process for server side rendering. This library provides fetch() compatible function and Node.js' http.createServer() compatible function. They are connected directly and bypass system calls. You can make shorten SSR response a little The request object has special attribute to identify actual access or shortcut access. You can skip authentication of BFF's API during SSR safely. shadow-fetch provides special method to handle JSON. That method skip converting JSON into string. Simple Benchmark time :-----------: :----------- node-fetch and http.Server 14.3 mS shadow-fetch with standard API 1.8 mS shadow-fetch with direct JSON API 0.13mS 8th Gen Core i5 with Node 9.4.0. You can test via node run benchmark . Installation Usage Node.js's http server shadow-fetch provides the function that is compatible with http.createServer() . shadow-fetch's server is available inside the same process. So useally you should launch two servers. You can use fetch function to access this server: Express.js Express.js mod","default_branch":null,"files":null,"tree":[],"storefront":"/r/shibukawa","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/shibukawa/shadow-fetch/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}